Jump to content
Sign in to follow this  
e_noni

resizable pyside widget

Recommended Posts

hi,

i need some help with resizable widgets. it seems the window wont redraw the window canvas. i tried to resize the window with a event(second picture), but nothing worked. the .ui comes from QtDesigner. do i have to set some flags? is it possible at all?

i appreciate your help, thx.

nic.

Capture.JPG

Capture2.JPG

Share this post


Link to post
Share on other sites

for anyone who struggle with this. just put your qt designer widget (with correct layouts) in a extra boxlayout and houdini will resize your custom script stuff.

example:

class your_widget(QtWidgets.QWidget):
   def __init__(self, parent=None):
      QtWidgets.QWidget.__init__(self, parent)
      ui_file = QtCore.QFile("your_widget.ui")
      ui_file.open(QtCore.QFile.ReadOnly)
      self.your_widget = QtUiTools.QUiLoader().load(ui_file, parentWidget=self)

      layout = QtWidgets.QVBoxLayout()
      layout.setContentsMargins(0, 0, 0, 0)
      self.setLayout(layout)
      layout.addWidget(self.your_widget)

widget_resize.gif

Edited by e_noni

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×