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