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

QGroupBox title looks enabled while group box is disabled

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3: Somewhat important
    • 6.8.1, 6.9.0 FF
    • 6.7.3, 6.8.0
    • None
    • Windows 10, Windows 11
    • Windows
    • b3971d29c (dev), 93ac15fcd (6.8)

    Description

      When a QGroupBox is disabled, its title does not look disabled. This is especially obvious when a group box is part of a layout in a disabled widget. It the appears as if the group box is not disabled.

      Note that if a a group box is checkable, its checkbox correctly is disabled when the group box is disabled.

       

      to reproduce, compile and run code below:

      attached is screenshot of result under Windows 10.

       

       

      #include <QLabel>
      #include <QGroupBox>
      #include <QWidget>
      #include <QVBoxLayout>
      #include <QApplication>
      
      int main(int argc, char *argv[])
      {
          QApplication app(argc,argv);
          QLabel *label = new QLabel("label");
          QGroupBox *groupbox1 = new QGroupBox("group box 1");
          QGroupBox *groupbox2 = new QGroupBox("group box 2");
          groupbox1->setCheckable(false);
          groupbox2->setCheckable(true);
          QVBoxLayout *layout = new QVBoxLayout();
          layout->addWidget(label);
          layout->addWidget(groupbox1);
          layout->addWidget(groupbox2);
          QWidget widget;
          widget.setLayout(layout);
          widget.setEnabled(false);
          widget.show();
          return QApplication::exec();
      } 

       

      Attachments

        For Gerrit Dashboard: QTBUG-129979
        # Subject Branch Project Status CR V

        Activity

          People

            owolff Oliver Wolff
            ev E Visser
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes