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

Inconsistent QComboBox button highlight behaviour

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.12.6, 5.14.0
    • GUI: Look'n'Feel
    • None
    • OS X 13, OS X 14, OS X 15
    • macOS

    Description

      The highlight status of the dropdown button next to a combobox is not consistent.

      Minimal code:

      #include <QApplication>
      #include <QComboBox>
      #include <QMainWindow>
      #include <QVBoxLayout>
      
      class TestWindow : public QMainWindow
      {
      public:
          TestWindow(QWidget *parent = nullptr) : QMainWindow(parent)
          {
              QComboBox* cb = new QComboBox;
              cb->addItem( "One" );
              cb->addItem( "Two" );
              cb->addItem( "Three" );
      
              QVBoxLayout* l = new QVBoxLayout;
              l->addWidget(cb);
              l->addWidget(cb);
      
              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();
      }
      

      Steps to reproduce:

      • Launch the application
      • (Notice the dropdown button is blue highlighted)
      • Click outside the application
      • (Notice the dropdown button is not blue highlighted)
      • Click inside the application
      • (Notice the dropdown button is blue highlighted)

      Now also:

      • Click on the dropdown button so the list of options appears
      • Click outside the application while the list is open
      • (Notice the dropdown button is not blue highlighted)
      • Click inside the application
      • (Notice the dropdown button is not blue highlighted)

      The blue highlighting of the dropdown button of a combo box  is not consistent when bringing the focus to the parent window depending on whether the combo box list was open or not when the parent window lost focus.

      Attached Capture1.png and Capture2.png show the different highlight states.

      Attachments

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

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            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