Skip to content

Commit 4b13635

Browse files
Fix Windows stuck behind main window in Qt 6.x
In Maya 2025 and 2026, both of these use Qt 6.x, where as previous Maya versions used 5.x and 4.x. It seems that the introduction of Qt 6.x has changed the default behaviour, where windows do not "stay on top" by default. Therefore we must hack-around this issue to keep the same behaviour, using the Qt window flag 'QtCore.Qt.WindowStaysOnTopHint'.
1 parent c200067 commit 4b13635

24 files changed

Lines changed: 69 additions & 21 deletions

File tree

python/mmSolver/tools/aboutwindow/ui/about_window.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def __init__(self, parent=None, name=None):
4444
self.setupUi(self)
4545
self.addSubForm(about_layout.AboutLayout)
4646
self.setWindowTitle(const.WINDOW_TITLE_BAR)
47-
self.setWindowFlags(QtCore.Qt.Tool)
47+
self.setWindowType(qtpyutils.WINDOW_TYPE_DIALOG)
4848

4949
# Hide default stuff
5050
self.baseHideMenuBar()

python/mmSolver/tools/attributebake/ui/attrbake_window.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def __init__(self, parent=None, name=None):
6464
self.addSubForm(attrbake_layout.AttributeBakeLayout)
6565

6666
self.setWindowTitle(const.WINDOW_TITLE)
67-
self.setWindowFlags(QtCore.Qt.Tool)
67+
self.setWindowType(qtpyutils.WINDOW_TYPE_DIALOG)
6868

6969
# Standard Buttons
7070
self.baseHideStandardButtons()

python/mmSolver/tools/attributecurvefilterpops/ui/attrcurvefilterpops_window.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def __init__(self, parent=None, name=None):
6464
self.addSubForm(layout_.AttributeCurveFilterPopsLayout)
6565

6666
self.setWindowTitle(const.WINDOW_TITLE)
67-
self.setWindowFlags(QtCore.Qt.Tool)
67+
self.setWindowType(qtpyutils.WINDOW_TYPE_DIALOG)
6868

6969
# Standard Buttons
7070
self.baseHideStandardButtons()

python/mmSolver/tools/cameraobjectscaleadjust/ui/cameraobjectscaleadjust_window.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def __init__(self, parent=None, name=None):
6262
self.addSubForm(ui_layout.CameraObjectScaleAdjustLayout)
6363

6464
self.setWindowTitle(const.WINDOW_TITLE)
65-
self.setWindowFlags(QtCore.Qt.Tool)
65+
self.setWindowType(qtpyutils.WINDOW_TYPE_DIALOG)
6666

6767
# Standard Buttons
6868
form = self.getSubForm()

python/mmSolver/tools/centertwodee/ui/centertwodee_window.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def __init__(self, parent=None, name=None):
8787
self.form.zoom_signal.connect(self.zoom_camera_shape_update)
8888

8989
self.setWindowTitle(const.WINDOW_TITLE)
90-
self.setWindowFlags(QtCore.Qt.Tool)
90+
self.setWindowType(qtpyutils.WINDOW_TYPE_DIALOG)
9191

9292
# Standard Buttons
9393
self.baseHideStandardButtons()

python/mmSolver/tools/channelsen/ui/channelsen_window.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def __init__(self, parent=None, name=None):
5151
self.addSubForm(channelsen_layout.ChannelSenLayout)
5252

5353
self.setWindowTitle('Channel Box Sensitivity')
54-
self.setWindowFlags(QtCore.Qt.Tool)
54+
self.setWindowType(qtpyutils.WINDOW_TYPE_DIALOG)
5555

5656
# Standard Buttons
5757
self.baseHideStandardButtons()

python/mmSolver/tools/convertmarker/ui/convertmarker_window.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def __init__(self, parent=None, name=None):
6161
self.addSubForm(convertmarker_layout.ConvertMarkerLayout)
6262

6363
self.setWindowTitle(const.WINDOW_TITLE)
64-
self.setWindowFlags(QtCore.Qt.Tool)
64+
self.setWindowType(qtpyutils.WINDOW_TYPE_DIALOG)
6565

6666
# Standard Buttons
6767
self.baseHideStandardButtons()

python/mmSolver/tools/createcontroller2/ui/createcontroller_window.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def __init__(self, parent=None, name=None):
6363
self.addSubForm(createcontroller_layout.CreateControllerLayout)
6464

6565
self.setWindowTitle(WINDOW_TITLE)
66-
self.setWindowFlags(QtCore.Qt.Tool)
66+
self.setWindowType(qtpyutils.WINDOW_TYPE_DIALOG)
6767

6868
# Standard Buttons
6969
self.baseHideStandardButtons()

python/mmSolver/tools/createcontroller3beta/ui/createcontroller_window.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def __init__(self, parent=None, name=None):
116116
self.form = self.getSubForm()
117117

118118
self.setWindowTitle(WINDOW_TITLE)
119-
self.setWindowFlags(QtCore.Qt.Tool)
119+
self.setWindowType(qtpyutils.WINDOW_TYPE_DIALOG)
120120

121121
# Hide irrelevant stuff
122122
self.baseHideStandardButtons()

python/mmSolver/tools/imagecacheprefs/ui/imagecacheprefs_window.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def __init__(self, parent=None, name=None):
6565
self.addSubForm(imagecacheprefs_layout.ImageCachePrefsLayout)
6666

6767
self.setWindowTitle(const.WINDOW_TITLE)
68-
self.setWindowFlags(QtCore.Qt.Tool)
68+
self.setWindowType(qtpyutils.WINDOW_TYPE_DIALOG)
6969

7070
# Standard Buttons
7171
self.baseHideStandardButtons()

0 commit comments

Comments
 (0)