Details
-
Bug
-
Resolution: Unresolved
-
P1: Critical
-
None
-
5.14.0
-
None
-
Arch Linux qt5-base 5.14.0-1 (currently in the [testing] repository)
Description
Since Qt 5.14, mouse tracking is enabled by default for QTextEdit. This was not the case in Qt 5.13 and is in contradiction to the QWidget class documentation, which states that disabled mouse tracking is the default.
The issue can be reproduced with the following minimal example:
#include <QApplication> #include <QTextEdit> class MyTextEdit : public QTextEdit { public: MyTextEdit(); void mouseMoveEvent(QMouseEvent *e); }; MyTextEdit::MyTextEdit() { //setMouseTracking(false); } void MyTextEdit::mouseMoveEvent(QMouseEvent *e) { this->append("mouseMoveEvent"); } int main(int argc, char **argv) { QApplication app(argc, argv); MyTextEdit myEdit; myEdit.show(); return app.exec(); }
In Qt 5.14, moving the mouse pointer over the text field without pressing any mouse button will start spamming "mouseMoveEvent". In Qt 5.13 the text field will remain empty unless a mouse button is pressed while moving the mouse.
Uncommenting "setMouseTracking(false)" in the constructor restores the expected behaviour on Qt 5.14, but should not be necessary according to the documentation.