E5Gui/E5PassivePopup.py

branch
screenshot
changeset 6915
57f7afc788e4
parent 6911
8f4a050c6895
equal deleted inserted replaced
6914:5ae038f273c4 6915:57f7afc788e4
12 12
13 from PyQt5.QtCore import pyqtSignal, Qt, QTimer, QPoint, QRect 13 from PyQt5.QtCore import pyqtSignal, Qt, QTimer, QPoint, QRect
14 from PyQt5.QtWidgets import QFrame, QVBoxLayout, QApplication 14 from PyQt5.QtWidgets import QFrame, QVBoxLayout, QApplication
15 15
16 from Globals import qVersionTuple 16 from Globals import qVersionTuple
17
17 18
18 class E5PassivePopup(QFrame): 19 class E5PassivePopup(QFrame):
19 """ 20 """
20 Class implementing dialog-like popup that displays messages without 21 Class implementing dialog-like popup that displays messages without
21 interrupting the user. 22 interrupting the user.
190 w = self.minimumSizeHint().width() 191 w = self.minimumSizeHint().width()
191 h = self.minimumSizeHint().height() 192 h = self.minimumSizeHint().height()
192 193
193 if qVersionTuple() >= (5, 10, 0): 194 if qVersionTuple() >= (5, 10, 0):
194 r = QApplication.screenAt(QPoint(x + w // 2, y + h // 2))\ 195 r = QApplication.screenAt(QPoint(x + w // 2, y + h // 2))\
195 .geometry() 196 .geometry()
196 else: 197 else:
197 r = QApplication.desktop().screenGeometry( 198 r = QApplication.desktop().screenGeometry(
198 QPoint(x + w // 2, y + h // 2)) 199 QPoint(x + w // 2, y + h // 2))
199 200
200 if x < r.center().x(): 201 if x < r.center().x():

eric ide

mercurial