From 359f441973461f9d0f0830797409e4bc00197e60 Mon Sep 17 00:00:00 2001 From: KIU Shueng Chuan Date: Thu, 14 Jan 2021 10:30:34 +0800 Subject: [PATCH] ExampleApp.py : remove Qt4 paletteChanged signal compatibility --- examples/ExampleApp.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/examples/ExampleApp.py b/examples/ExampleApp.py index 4c1a637d..6c8d8b46 100644 --- a/examples/ExampleApp.py +++ b/examples/ExampleApp.py @@ -362,9 +362,7 @@ class ExampleLoader(QtGui.QMainWindow): self.ui.codeView.setLayout(self.codeLayout) self.hl = PythonHighlighter(self.ui.codeView.document()) app = QtGui.QApplication.instance() - if QT_LIB in ['PyQt5', 'PySide2']: - # Qt4 does not have a paletteChanged signal - app.paletteChanged.connect(self.updateTheme) + app.paletteChanged.connect(self.updateTheme) self.codeLayout.addItem(QtGui.QSpacerItem(100,100,QtGui.QSizePolicy.Expanding,QtGui.QSizePolicy.Expanding), 0, 0) self.codeLayout.addWidget(self.codeBtn, 1, 1) self.codeBtn.hide()