setGeometry has no Effect on MDISubWindow
Solved
General and Desktop
-
hi
Below is my Code
SetGeometry has no Effect on mdiSubWindow
Kindly enlighten meclass navigationWidget(QtWidgets.QMdiSubWindow): def __init__(self, mdiArea , cQRect): super(navigationWidget, self).__init__() self.cQRect =cQRect self.setWidget(QtWidgets.QListView()) self.setWindowTitle("Options") self.setGeometry(self.cQRect) mdiArea.addSubWindow(self) mdiArea.show()
-
hi
Below is my Code
SetGeometry has no Effect on mdiSubWindow
Kindly enlighten meclass navigationWidget(QtWidgets.QMdiSubWindow): def __init__(self, mdiArea , cQRect): super(navigationWidget, self).__init__() self.cQRect =cQRect self.setWidget(QtWidgets.QListView()) self.setWindowTitle("Options") self.setGeometry(self.cQRect) mdiArea.addSubWindow(self) mdiArea.show()
@ArunBm said in setGeometry has no Effect on MDISubWindow:
Something vaguely similar without solution reported years ago: https://forum.qt.io/topic/28518/qmdisubwindow-does-not-go-to-position-used-in-setgeometryOne thing you might try: move the
setGeometry()
call to after theaddSubWindow()
and even after theshow()
, does that make it work?Otherwise I don't know, maybe you could hook onto
resize
events to see if you can find what is going on.