- made sure that the HDPI scaling attribute is set before the QApplication is started
- made sure that when saving a project, the app will try to update the active object from UI form only if there is an active object
This commit is contained in:
10
FlatCAM.py
10
FlatCAM.py
@@ -55,6 +55,11 @@ if __name__ == '__main__':
|
||||
# else:
|
||||
# QGuiApplication.setAttribute(Qt.AA_EnableHighDpiScaling, False)
|
||||
|
||||
if hdpi_support == 2:
|
||||
QtWidgets.QApplication.setAttribute(Qt.AA_EnableHighDpiScaling, True)
|
||||
else:
|
||||
QtWidgets.QApplication.setAttribute(Qt.AA_EnableHighDpiScaling, False)
|
||||
|
||||
app = QtWidgets.QApplication(sys.argv)
|
||||
|
||||
# apply style
|
||||
@@ -63,11 +68,6 @@ if __name__ == '__main__':
|
||||
style = settings.value('style', type=str)
|
||||
app.setStyle(style)
|
||||
|
||||
if hdpi_support == 2:
|
||||
app.setAttribute(Qt.AA_EnableHighDpiScaling, True)
|
||||
else:
|
||||
app.setAttribute(Qt.AA_EnableHighDpiScaling, False)
|
||||
|
||||
fc = App()
|
||||
|
||||
sys.exit(app.exec_())
|
||||
|
||||
Reference in New Issue
Block a user