File: get_resolution.py

package info (click to toggle)
python-pyqtgraph 0.11.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 4,684 kB
  • sloc: python: 45,678; makefile: 115; ansic: 40
file content (15 lines) | stat: -rw-r--r-- 527 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from .. import mkQApp

def test_screenInformation():
    qApp = mkQApp()
    desktop = qApp.desktop()
    resolution = desktop.screenGeometry()
    availableResolution = desktop.availableGeometry()
    print("Screen resolution: {}x{}".format(resolution.width(), resolution.height()))
    print("Available geometry: {}x{}".format(availableResolution.width(), availableResolution.height()))
    print("Number of Screens: {}".format(desktop.screenCount()))
    return None


if __name__ == "__main__":
    test_screenInformation()