Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-81566

Blue highlighting of active line edit can be drawn on multiple widgets at the same time

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P3: Somewhat important
    • Resolution: Unresolved
    • Affects Version/s: 5.12.6, 5.14.0
    • Fix Version/s: None
    • Component/s: GUI: Look'n'Feel
    • Labels:
      None
    • Environment:
      Windows 7, Windows 10
    • Platform/s:
      Windows

      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.

        Attachments

        1. 1.png
          1.png
          10 kB
        2. 2.png
          2.png
          10 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            qt.team.quick.subscriptions Qt Quick and Widgets Team
            Reporter:
            fdca_enfocus fdca_enfocus
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes