Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.12.6, 5.14.0
-
None
-
Windows 7, Windows 10
Description
The blue highlighting drawn around a line edit on Windows to indicate the active line edit can be drawn around 2 widgets at the same time.
Clicking on a line edit, followed by quickly clicking on another line edit will cause both line edits to have a blue highlighting drawn around them.
When the user invokes an update by moving the mouse over the line edit, or resizing the window for example, the wrongly drawn blue highlighting will disappear.
It appears an update event is not triggered or handled for the first line edit that was clicked.
Minimal code:
#include <QApplication> #include <QLineEdit> #include <QMainWindow> #include <QVBoxLayout> class TestWindow : public QMainWindow { public: TestWindow(QWidget *parent=Q_NULLPTR) : QMainWindow(parent) { QLineEdit* le1 = new QLineEdit; QLineEdit* le2 = new QLineEdit; QVBoxLayout* l = new QVBoxLayout; l->addWidget(le1); l->addWidget(le2); QWidget* w = new QWidget; w->setLayout(l); setCentralWidget(w); } }; int main(int argc, char *argv[]) { QApplication a(argc, argv); TestWindow w; w.show(); return a.exec(); }
Attachments:
- 1.png: Screenshot of the top line edit being active. Notice the blue edge around the top line edit.
- 2.png: Screenshot after quickly clicking the bottom line edit, followed by the top line edit. Notice the blue edge around both line edits, only the top line edit should have the blue edge.