diff --git a/CHANGELOG.md b/CHANGELOG.md index f1259c92..f5b1b4bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,11 @@ CHANGELOG for FlatCAM beta ================================================= +8.12.2020 + +- few changes in the Milling UI +- made some changes in the application to prepare for usage of PyQt6 + 7.12.2020 - Geometry object - work in upgrade of the data structure diff --git a/appGUI/GUIElements.py b/appGUI/GUIElements.py index c44b5611..1fc6c8f8 100644 --- a/appGUI/GUIElements.py +++ b/appGUI/GUIElements.py @@ -2653,7 +2653,7 @@ class FCDetachableTab(QtWidgets.QTabWidget): self.protect_by_name = protect_by_name if isinstance(protect_by_name, list) else None # Close all detached tabs if the application is closed explicitly - QtWidgets.qApp.aboutToQuit.connect(self.closeDetachedTabs) # @UndefinedVariable + QtCore.QCoreApplication.instance().aboutToQuit.connect(self.closeDetachedTabs) # @UndefinedVariable # used by the property self.useOldIndex(param) self.use_old_index = None diff --git a/appGUI/MainGUI.py b/appGUI/MainGUI.py index 584b0fe1..461a0a19 100644 --- a/appGUI/MainGUI.py +++ b/appGUI/MainGUI.py @@ -1831,7 +1831,7 @@ class MainGUI(QtWidgets.QMainWindow): self.tools2_defaults_form = Tools2PreferencesUI(decimals=self.decimals) self.util_defaults_form = UtilPreferencesUI(decimals=self.decimals) - QtWidgets.qApp.installEventFilter(self) + QtCore.QCoreApplication.instance().installEventFilter(self) # ######################################################################## # ################## RESTORE THE TOOLBAR STATE from file ################# @@ -4101,10 +4101,10 @@ class MainGUI(QtWidgets.QMainWindow): # pos = QtCore.QPoint((self.shell._edit.width() - 40), (self.shell._edit.height() - 2)) # e = QtGui.QMouseEvent(QtCore.QEvent.MouseButtonPress, pos, QtCore.Qt.LeftButton, QtCore.Qt.LeftButton, # no_km) - # QtWidgets.qApp.sendEvent(self.shell._edit, e) + # QtCore.QCoreApplication.instance().sendEvent(self.shell._edit, e) # f = QtGui.QMouseEvent(QtCore.QEvent.MouseButtonRelease, pos, QtCore.Qt.LeftButton, QtCore.Qt.LeftButton, # no_km) - # QtWidgets.qApp.sendEvent(self.shell._edit, f) + # QtCore.QCoreApplication.instance().sendEvent(self.shell._edit, f) def on_shelldock_toggled(self, visibility): if visibility is True: diff --git a/appGUI/preferences/general/GeneralGUIPrefGroupUI.py b/appGUI/preferences/general/GeneralGUIPrefGroupUI.py index f527a458..6ddca7a4 100644 --- a/appGUI/preferences/general/GeneralGUIPrefGroupUI.py +++ b/appGUI/preferences/general/GeneralGUIPrefGroupUI.py @@ -100,7 +100,8 @@ class GeneralGUIPrefGroupUI(OptionsGroupUI): self.style_combo = FCComboBox() self.style_combo.addItems(QtWidgets.QStyleFactory.keys()) # find current style - index = self.style_combo.findText(QtWidgets.qApp.style().objectName(), QtCore.Qt.MatchFixedString) + current_style = QtCore.QCoreApplication.instance().style().objectName() + index = self.style_combo.findText(current_style, QtCore.Qt.MatchFixedString) self.style_combo.setCurrentIndex(index) self.style_combo.activated[str].connect(self.handle_style) diff --git a/appTools/ToolMilling.py b/appTools/ToolMilling.py index 127084be..64d6aaa3 100644 --- a/appTools/ToolMilling.py +++ b/appTools/ToolMilling.py @@ -3370,7 +3370,7 @@ class MillingUI: # ************************************************************************ # Tool Table for Geometry - self.geo_tools_table = FCTable(drag_drop=True) + self.geo_tools_table = FCTable(drag_drop=False) self.geo_tools_table.setSizeAdjustPolicy(QtWidgets.QAbstractScrollArea.AdjustToContents) grid0.addWidget(self.geo_tools_table, 12, 0, 1, 2) diff --git a/app_Main.py b/app_Main.py index eb98c863..566ad54b 100644 --- a/app_Main.py +++ b/app_Main.py @@ -3778,7 +3778,7 @@ class App(QtCore.QObject): @staticmethod def kill_app(): - QtWidgets.qApp.quit() + QtCore.QCoreApplication.instance().quit() # When the main event loop is not started yet in which case the qApp.quit() will do nothing # we use the following command # sys.exit(0)