Fixed UI crash when configuring high dpi scaling on some systems

On LinuxMint18 even with a compatible PyQt lib, it crashes, so just
don't set this option.
This commit is contained in:
Gustavo Iñiguez Goia 2020-02-19 01:04:58 +01:00
parent 7eb0b6da30
commit b409eca0ed

View file

@ -39,7 +39,10 @@ if __name__ == '__main__':
os.environ["QT_AUTO_SCREEN_SCALE_FACTOR"] = "1" os.environ["QT_AUTO_SCREEN_SCALE_FACTOR"] = "1"
app = QtWidgets.QApplication(sys.argv) app = QtWidgets.QApplication(sys.argv)
if supported_qt_version(5,6,0): if supported_qt_version(5,6,0):
try:
app.setAttribute(QtCore.Qt.AA_EnableHighDpiScaling, True) app.setAttribute(QtCore.Qt.AA_EnableHighDpiScaling, True)
except Exception:
pass
service = UIService(app, on_exit) service = UIService(app, on_exit)
server = grpc.server(futures.ThreadPoolExecutor(max_workers=4)) server = grpc.server(futures.ThreadPoolExecutor(max_workers=4))