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

QGroupBox does not react to click to uncheck if setChecked is called with bad data

    XMLWordPrintable

Details

    • Linux/X11, Windows

    Description

      Hello there. I saw a very strange checked QGroupBox that I couldn't uncheck by mouse. I tried to reproduce the problem and managed to shorten it in the following code snippet.

      #include <QApplication>
      #include <QDebug>
      #include <QGroupBox>
      
      int main(int argc, char *argv[])
      {
          QApplication app(argc, argv);
          QGroupBox box;
          box.setCheckable(true);
          box.setTitle("Title");
          int i = 100;
          bool *a = reinterpret_cast<bool *>(&i);
          qDebug() << int(*a);
          box.setChecked(*a);
          box.show();
          return app.exec();
      }

      Attachments

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

        Activity

          People

            lagocs Laszlo Agocs
            usefulfriend Ali Tabatabaei
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes