E5Gui/E5PassivePopup.py

changeset 6911
8f4a050c6895
parent 6645
ad476851d7e0
child 6915
57f7afc788e4
--- a/E5Gui/E5PassivePopup.py	Sun Mar 31 12:38:25 2019 +0200
+++ b/E5Gui/E5PassivePopup.py	Sun Mar 31 14:38:46 2019 +0200
@@ -13,6 +13,7 @@
 from PyQt5.QtCore import pyqtSignal, Qt, QTimer, QPoint, QRect
 from PyQt5.QtWidgets import QFrame, QVBoxLayout, QApplication
 
+from Globals import qVersionTuple
 
 class E5PassivePopup(QFrame):
     """
@@ -189,8 +190,12 @@
         w = self.minimumSizeHint().width()
         h = self.minimumSizeHint().height()
         
-        r = QApplication.desktop().screenGeometry(
-            QPoint(x + w // 2, y + h // 2))
+        if qVersionTuple() >= (5, 10, 0):
+            r = QApplication.screenAt(QPoint(x + w // 2, y + h // 2))\
+            .geometry()
+        else:
+            r = QApplication.desktop().screenGeometry(
+                QPoint(x + w // 2, y + h // 2))
         
         if x < r.center().x():
             x += target.width()

eric ide

mercurial