How I can center window on active screen but not on general screen? This code moves window to center on general screen, not active screen:
import sys
from Py
One correction for PyQt5 users:
import PyQt5
def center(self):
frameGm = self.frameGeometry()
screen = PyQt5.QtWidgets.QApplication.desktop().screenNumber(PyQt5.QtWidgets.QApplication.desktop().cursor().pos())
centerPoint = PyQt5.QtWidgets.QApplication.desktop().screenGeometry(screen).center()
frameGm.moveCenter(centerPoint)
self.move(frameGm.topLeft())