Skip to content

Commit 4989087

Browse files
authored
Merge pull request #70 from dihm/pyqt6
Add Pyqt6
2 parents 05090b8 + 08e3eac commit 4989087

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ dependencies = [
3232
"labscript_utils>=3.1.0b1",
3333
"labscript-c-extensions",
3434
"pyqtgraph>=0.11.1",
35-
"qtutils>=4.0.0",
35+
"qtutils>=4.1.3",
3636
"zprocess",
3737
"numpy>=1.15",
3838
"scipy",

runviewer/__main__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,10 @@ class RunviewerMainWindow(QtWidgets.QMainWindow):
197197
def changeEvent(self, event):
198198

199199
# theme update only for PySide6/PyQt6
200-
if QT_ENV.endswith('6') and event.type() == QtCore.QEvent.Type.ThemeChange:
200+
if (QT_ENV.endswith('6')
201+
and (event.type() == QtCore.QEvent.Type.ApplicationPaletteChange
202+
or event.type() == QtCore.QEvent.Type.StyleChange)):
203+
201204
for widget in self.findChildren(QtWidgets.QWidget):
202205
# Complex widgets, like TreeView and TableView require triggering styleSheet and palette updates
203206
widget.setStyleSheet(widget.styleSheet())
@@ -1668,7 +1671,6 @@ def handler(self, h5_filepath):
16681671
if __name__ == "__main__":
16691672
qapplication = QtWidgets.QApplication.instance()
16701673
if qapplication is None:
1671-
qapplication = QApplication(sys.argv)
16721674
qapplication = QtWidgets.QApplication(sys.argv)
16731675

16741676
shots_to_process_queue = Queue()

0 commit comments

Comments
 (0)