mirror of
https://github.com/arsenetar/dupeguru.git
synced 2025-03-10 05:34:36 +00:00
Removed an old workaround in the Qt version that doesn't seem to be needed with the current version of Qt.
This commit is contained in:
parent
731e68f164
commit
ebeb068042
@ -8,8 +8,8 @@
|
|||||||
|
|
||||||
import urllib.parse
|
import urllib.parse
|
||||||
|
|
||||||
from PyQt4.QtCore import pyqtSignal, Qt, QRect, QEvent, QPoint, QUrl
|
from PyQt4.QtCore import pyqtSignal, Qt, QRect, QUrl
|
||||||
from PyQt4.QtGui import (QComboBox, QStyledItemDelegate, QMouseEvent, QApplication, QBrush, QStyle,
|
from PyQt4.QtGui import (QComboBox, QStyledItemDelegate, QApplication, QBrush, QStyle,
|
||||||
QStyleOptionComboBox, QStyleOptionViewItemV4)
|
QStyleOptionComboBox, QStyleOptionViewItemV4)
|
||||||
|
|
||||||
from hscommon.trans import tr
|
from hscommon.trans import tr
|
||||||
@ -47,11 +47,7 @@ class DirectoriesDelegate(QStyledItemDelegate):
|
|||||||
def setEditorData(self, editor, index):
|
def setEditorData(self, editor, index):
|
||||||
value = index.model().data(index, Qt.EditRole)
|
value = index.model().data(index, Qt.EditRole)
|
||||||
editor.setCurrentIndex(value);
|
editor.setCurrentIndex(value);
|
||||||
press = QMouseEvent(QEvent.MouseButtonPress, QPoint(0, 0), Qt.LeftButton, Qt.LeftButton, Qt.NoModifier)
|
editor.showPopup()
|
||||||
release = QMouseEvent(QEvent.MouseButtonRelease, QPoint(0, 0), Qt.LeftButton, Qt.LeftButton, Qt.NoModifier)
|
|
||||||
QApplication.sendEvent(editor, press)
|
|
||||||
QApplication.sendEvent(editor, release)
|
|
||||||
# editor.showPopup() # this causes a weird glitch. the ugly workaround is above.
|
|
||||||
|
|
||||||
def setModelData(self, editor, model, index):
|
def setModelData(self, editor, model, index):
|
||||||
value = editor.currentIndex()
|
value = editor.currentIndex()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user