mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-08-11 09:13:57 -04:00
Another mysterious instance of Qt delivering resize events with type set to that of mouse events.
Fixes #1714353 [series name change](https://bugs.launchpad.net/calibre/+bug/1714353)
This commit is contained in:
parent
08471c12a4
commit
6f9214d5a7
@ -266,7 +266,7 @@ class Completer(QListView): # {{{
|
||||
# See https://bugreports.qt-project.org/browse/QTBUG-41806
|
||||
e.accept()
|
||||
return True
|
||||
elif etype == e.MouseButtonPress and not self.rect().contains(self.mapFromGlobal(e.globalPos())):
|
||||
elif etype == e.MouseButtonPress and hasattr(e, 'globalPos') and not self.rect().contains(self.mapFromGlobal(e.globalPos())):
|
||||
# A click outside the popup, close it
|
||||
if isinstance(widget, QComboBox):
|
||||
# This workaround is needed to ensure clicking on the drop down
|
||||
@ -518,6 +518,7 @@ class EditWithComplete(EnComboBox):
|
||||
return True
|
||||
return EnComboBox.eventFilter(self, obj, e)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
from PyQt5.Qt import QDialog, QVBoxLayout
|
||||
app = QApplication([])
|
||||
|
Loading…
x
Reference in New Issue
Block a user