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

QLineEdit QSpinBox QDoubleSpinBox SetStyleSheet can not change background color 不能设置背景色彩

XMLWordPrintable

    • macOS, Windows

      QLineEdit QSpinBox QDoubleSpinBox can not change background color 不能设置背景色彩

      code:

      QLineEdit *nameEdit = new QLineEdit(this);

      nameEdit->setGeometry(30,50,350,50);

      nameEdit->setText("QLineEdit can not change background color");

      nameEdit->setStyleSheet(// "QLineEdit { background-color: rgb(255, 0, 0) }" "color: blue;" "background-color: yellow;" "alternate-background-color: blue;" "selection-color: yellow;" "selection-background-color: blue;" ); 

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

            esabraha Eskil Abrahamsen Blomfeldt
            waterblue lee ning
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes