Details
-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
5.7.1, 5.12.3
-
None
Description
Run the following script with environment QT_SCALE_FACTOR=2, then move the cursor around. The output value jumps whenever the cursor crosses the monitor boundary.
#!/usr/bin/python3 import sys from PyQt5.QtWidgets import QApplication from PyQt5.QtCore import QObject from PyQt5.QtGui import QCursor from PyQt5.QtCore import QTimer a = QApplication(sys.argv) t = QTimer() t.setSingleShot(False) t.setInterval(50) t.timeout.connect(lambda: print(QCursor.pos().x(), QCursor.pos().y())) t.start() a.exec()
My test setup consists of a 2560x1440 display and a 1920x1080 display to its right. The X coordinate is in range of [0,1280] when the cursor is on the first display and [2560,3520] when it's on the second display, rendering the result from QCursor::pos() mostly unusable.