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

Stylesheet: the disabled pseudo-state is not available for QPushbutton

    XMLWordPrintable

Details

    Description

      It seems that the disabled pseudo state is not available for QPushButton

      Example:

      #include <QtGui>

      int main(int argc, char *argv[])
      {
      QApplication app(argc, argv);

      QWidget myWidget;

      QVBoxLayout *layout = new QVBoxLayout;
      QPushButton *push1 = new QPushButton("underline");
      push1->setStyleSheet("QPushButton:disabled

      {text-decoration: underline; }

      ");
      push1->setDisabled(true);
      QPushButton *push2 = new QPushButton("line-through");
      push2->setStyleSheet("QPushButton

      {text-decoration: line-through; }

      ");
      layout->addWidget(push1);
      layout->addWidget(push2);
      myWidget.setLayout(layout);

      myWidget.show();

      return app.exec();
      }

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            xcm Martin Petersson (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes