8 lines
192 B
Python
8 lines
192 B
Python
from PySide2 import QtWidgets
|
|
|
|
|
|
def center_window(w):
|
|
qr = w.frameGeometry()
|
|
cp = QtWidgets.QDesktopWidget().availableGeometry().center()
|
|
qr.moveCenter(cp)
|
|
w.move(qr.topLeft()) |