[QScintilla] Mouse event filter for QsciScintilla
VA
dev+pyqt at indigo.re
Sun Nov 12 21:17:26 GMT 2017
Hi,
It seems there's a bug with QsciScintilla widgets because they do not
receive mouse press events, so it's not possible to have an event filter
for mouse presses.
With this code sample, 'clicked' is never printed when clicking the text
widget:
from PyQt5.QtCore import *
from PyQt5.QtWidgets import *
from PyQt5.Qsci import *
class Filter(QObject):
def eventFilter(self, target, ev):
if ev.type() == QEvent.MouseButtonPress:
print('clicked')
return False
app = QApplication([])
f = Filter()
sci = QsciScintilla()
sci.installEventFilter(f)
sci.show()
app.exec_()
More information about the QScintilla
mailing list