Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-2564

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • Not Evaluated
    • None
    • 6.6.1
    • PySide
    • None
    • Debian 12, Mate-Desktop 1.26.2
    • Linux/Other display system

    Description

      Adding a comboxbox to a groupbox causes issues in the rendering of it. It looks like no text is displayed (white text on light grey bg) until it's clicked at which point it opens up and displays the options in black, but once an option is selected, it collapses and reverts back to using white text.

      No custom stylesheets used.

      Works as expected in KDE.

      It's worth noting that adding the combobox directly to the MyWidget layout works as expected.

      Sample code:

       

      ```
      from PySide6.QtWidgets import QApplication, QFrame, QGroupBox, QComboBox, QWidget, QVBoxLayout
      import sys

      class MyWidget(QWidget):
      def {}init{}(self):
      super().{}init{}()

      groupbox = QGroupBox(self)
      groupbox_layout = QVBoxLayout(groupbox)

      combo = QComboBox(groupbox)
      combo.addItems(["Option 1", "Option 2", "Option 3"])
      groupbox_layout.addWidget(combo)

      layout = QVBoxLayout(self)
      layout.addWidget(groupbox)

      app = QApplication(sys.argv)
      window = MyWidget()
      window.show()
      sys.exit(app.exec())
      ```

      To fix, adding a simple stylesheet for Mate-Desktop is a dirty hack:

      `
      combo.setStyleSheet('*{color:black}')
       
      `
       

      Attachments

        Issue Links

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

          Activity

            People

              crmaurei Cristian Maureira-Fredes
              theoneandonly Peter T
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes