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

Mate-Desktop - combobox inside groupbox renders selected text in white

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 6.6.1
    • GUI: Font handling
    • None
    • Debian 12, Mate-Desktop 1.26.2
    • Linux/X11

    Description

      using mate-desktop 1.26.2 on debian 12

      When creating a combobox inside a groupbox, the text that is shown is white on a light grey background and when clicked, the combobox opens with black text, but following a selection folds back down and the font colour goes back to white. Whilst dragging the window the groupbox is in, the font goes to black

      Sample code (converted from python using chatgpt)

      
      #include <QApplication>
      #include <QWidget>
      #include <QGroupBox>
      #include <QVBoxLayout>
      #include <QComboBox>
      
      class MyWidget : public QWidget {
      public:
          MyWidget() {
              QGroupBox* groupBox = new QGroupBox(this);
              QVBoxLayout* groupBoxLayout = new QVBoxLayout(groupBox);
      
              QComboBox* combo = new QComboBox(groupBox);
              combo->addItems(\{"Option 1", "Option 2", "Option 3"});
              groupBoxLayout->addWidget(combo);
      
              QVBoxLayout* layout = new QVBoxLayout(this);
              layout->addWidget(groupBox);
          }
      };
      
      int main(int argc, char *argv[]) {
          QApplication app(argc, argv);
          MyWidget window;
          window.show();
          return app.exec();
      }
      
      

      This is without any custom stylesheets, however, a quick simple solution I've found is to add a little stylesheet of addStyleSheet('*{color:black}')

      Previously reported in the python bindings: PYSIDE-2564

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              esabraha Eskil Abrahamsen Blomfeldt
              theoneandonly Peter T
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes