Exemple #1
0
def position_app():
    sizeObject = QDesktopWidget().screenGeometry(-1)
    height = sizeObject.height()
    coord = QDesktopWidget().availableGeometry().center()
    to_sub = QtCore.QPoint(270, height / 3)
    center = coord.__sub__(to_sub)
    return center
Exemple #2
0
def position_app():
    coord = QDesktopWidget().availableGeometry().center()
    to_sub = QtCore.QPoint(270, 450)  # half the width of the application
    center = coord.__sub__(to_sub)
    return center