From 40034540cf8bdc04c1a784e78aa6f176d5752c88 Mon Sep 17 00:00:00 2001 From: Marius Stanciu Date: Wed, 11 Aug 2021 15:36:59 +0300 Subject: [PATCH 1/2] - fixed splash screen position on current screen when using multiple screens --- app_Main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app_Main.py b/app_Main.py index 350fea01..63965664 100644 --- a/app_Main.py +++ b/app_Main.py @@ -891,7 +891,8 @@ class App(QtCore.QObject): # move splashscreen to the current monitor # desktop = QtWidgets.QApplication.desktop() # screen = desktop.screenNumber(QtGui.QCursor.pos()) - screen = QtWidgets.QWidget.screen(self.splash) + # screen = QtWidgets.QWidget.screen(self.splash) + screen = QtWidgets.QApplication.screenAt(QtGui.QCursor.pos()) current_screen_center = screen.availableGeometry().center() self.splash.move(current_screen_center - self.splash.rect().center()) From 63506b57a3b30723330a271530f6f3b92358673b Mon Sep 17 00:00:00 2001 From: Marius Stanciu Date: Wed, 11 Aug 2021 15:46:29 +0300 Subject: [PATCH 2/2] - some changes due of porting to PyQt6 --- appGUI/MainGUI.py | 2 +- appObjects/ObjectCollection.py | 2 +- appPlugins/ToolShell.py | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/appGUI/MainGUI.py b/appGUI/MainGUI.py index 2bee5920..d812c4b5 100644 --- a/appGUI/MainGUI.py +++ b/appGUI/MainGUI.py @@ -3977,7 +3977,7 @@ class MainGUI(QtWidgets.QMainWindow): def dropEvent(self, event): if event.mimeData().hasUrls: - event.setDropAction(QtCore.Qt.CopyAction) + event.setDropAction(QtCore.Qt.DropAction.CopyAction) event.accept() for url in event.mimeData().urls(): self.filename = str(url.toLocalFile()) diff --git a/appObjects/ObjectCollection.py b/appObjects/ObjectCollection.py index 3c28f4e4..bff75c21 100644 --- a/appObjects/ObjectCollection.py +++ b/appObjects/ObjectCollection.py @@ -537,7 +537,7 @@ class ObjectCollection(QtCore.QAbstractItemModel): return False def supportedDropActions(self): - return Qt.MoveAction + return Qt.DropAction.MoveAction def flags(self, index): default_flags = QtCore.QAbstractItemModel.flags(self, index) diff --git a/appPlugins/ToolShell.py b/appPlugins/ToolShell.py index 89631393..e350644d 100644 --- a/appPlugins/ToolShell.py +++ b/appPlugins/ToolShell.py @@ -97,8 +97,8 @@ class TermWidget(QWidget): :return: None """ - self._edit.setTextColor(QtCore.Qt.white) - self._edit.setTextBackgroundColor(QtCore.Qt.darkGreen) + self._edit.setTextColor(QtCore.Qt.GlobalColor.white) + self._edit.setTextBackgroundColor(QtCore.Qt.GlobalColor.darkGreen) if detail is None: self._edit.setPlainText(_("...processing...")) else: @@ -113,8 +113,8 @@ class TermWidget(QWidget): :return: """ - self._edit.setTextColor(QtCore.Qt.black) - self._edit.setTextBackgroundColor(QtCore.Qt.white) + self._edit.setTextColor(QtCore.Qt.GlobalColor.black) + self._edit.setTextBackgroundColor(QtCore.Qt.GlobalColor.white) self._edit.setPlainText('') self._edit.setDisabled(False) self._edit.setFocus()