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_()
_______________________________________________
QScintilla mailing list
[email protected]
https://www.riverbankcomputing.com/mailman/listinfo/qscintilla

Reply via email to