def get_screen_height(qobject): if hasattr(qobject, "screen"): return qobject.screen().size().height() else: print("unable to detect screen height falling back to default value of 1080") return 1080