kiryha Posted April 24, 2019 Share Posted April 24, 2019 I have a pyside window: import hou from PySide2 import QtCore, QtUiTools, QtWidgets, QtGui class BatchRender(QtWidgets.QWidget): def __init__(self): # SETUP UI WINDOW super(BatchRender, self).__init__() ui_file = "C:/temp/test.ui" self.ui = QtUiTools.QUiLoader().load(ui_file, parentWidget=self) self.setParent(hou.ui.mainQtWindow(), QtCore.Qt.Window) BR = BatchRender() BR.show() This window does not scales as it usually happens with QT widgets. How could I fix this, and window name as well (houdinifx)? test.ui Quote Link to comment Share on other sites More sharing options...
Stalkerx777 Posted April 24, 2019 Share Posted April 24, 2019 Because in your .ui file you have the width and height attributes are fixed values.? Quote Link to comment Share on other sites More sharing options...
kiryha Posted April 25, 2019 Author Share Posted April 25, 2019 But usually, it works fine in other apps... Can I delete width and height attributes (or set them to non-fixed values)? I had no luck with deleting <width>296</width> and <height>70</height>. I suppose this is because of parenting my UI to Houdini main window. Quote Link to comment Share on other sites More sharing options...
kiryha Posted April 27, 2019 Author Share Posted April 27, 2019 import hou from PySide2 import QtCore, QtUiTools, QtWidgets, QtGui class BatchRender(QtWidgets.QWidget): def __init__(self): # SETUP UI WINDOW super(BatchRender, self).__init__() ui_file = "C:/temp/test.ui" self.ui = QtUiTools.QUiLoader().load(ui_file, parentWidget=self) mainLayout = QtWidgets.QVBoxLayout() mainLayout.addWidget(self.ui) self.setLayout(mainLayout) self.setParent(hou.ui.mainQtWindow(), QtCore.Qt.Window) BR = BatchRender() BR.show() Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.