- some changes due of porting to PyQt6
This commit is contained in:
@@ -3977,7 +3977,7 @@ class MainGUI(QtWidgets.QMainWindow):
|
||||
|
||||
def dropEvent(self, event):
|
||||
if event.mimeData().hasUrls:
|
||||
event.setDropAction(QtCore.Qt.CopyAction)
|
||||
event.setDropAction(QtCore.Qt.DropAction.CopyAction)
|
||||
event.accept()
|
||||
for url in event.mimeData().urls():
|
||||
self.filename = str(url.toLocalFile())
|
||||
|
||||
@@ -537,7 +537,7 @@ class ObjectCollection(QtCore.QAbstractItemModel):
|
||||
return False
|
||||
|
||||
def supportedDropActions(self):
|
||||
return Qt.MoveAction
|
||||
return Qt.DropAction.MoveAction
|
||||
|
||||
def flags(self, index):
|
||||
default_flags = QtCore.QAbstractItemModel.flags(self, index)
|
||||
|
||||
@@ -97,8 +97,8 @@ class TermWidget(QWidget):
|
||||
:return: None
|
||||
"""
|
||||
|
||||
self._edit.setTextColor(QtCore.Qt.white)
|
||||
self._edit.setTextBackgroundColor(QtCore.Qt.darkGreen)
|
||||
self._edit.setTextColor(QtCore.Qt.GlobalColor.white)
|
||||
self._edit.setTextBackgroundColor(QtCore.Qt.GlobalColor.darkGreen)
|
||||
if detail is None:
|
||||
self._edit.setPlainText(_("...processing..."))
|
||||
else:
|
||||
@@ -113,8 +113,8 @@ class TermWidget(QWidget):
|
||||
:return:
|
||||
"""
|
||||
|
||||
self._edit.setTextColor(QtCore.Qt.black)
|
||||
self._edit.setTextBackgroundColor(QtCore.Qt.white)
|
||||
self._edit.setTextColor(QtCore.Qt.GlobalColor.black)
|
||||
self._edit.setTextBackgroundColor(QtCore.Qt.GlobalColor.white)
|
||||
self._edit.setPlainText('')
|
||||
self._edit.setDisabled(False)
|
||||
self._edit.setFocus()
|
||||
|
||||
Reference in New Issue
Block a user