- few changes in the Milling UI
- made some changes in the application to prepare for usage of PyQt6
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user