Jump to content

resizable pyside widget


e_noni

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

Link to comment
Share on other sites

  • 9 months later...

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
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...