Merge pull request #802 from MikeTheWatchGuy/Dev-latest

GetScreenDimensions for Windows
This commit is contained in:
MikeTheWatchGuy 2018-11-27 14:26:59 -05:00 committed by GitHub
commit 367aa3a1aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 2 deletions

View File

@ -3228,8 +3228,13 @@ class Window:
print('*** Error loading form to disk ***') print('*** Error loading form to disk ***')
def GetScreenDimensions(self): def GetScreenDimensions(self):
# TODO try:
screen_width = screen_height = 0 screen = _my_windows.QTApplication.primaryScreen()
except:
return None, None
size = screen.size()
screen_width = size.width()
screen_height = size.height()
return screen_width, screen_height return screen_width, screen_height
def Move(self, x, y): def Move(self, x, y):