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

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.12.2, 5.14.0 Alpha
    • 5.10.0, 5.12.0
    • Widgets: Style Sheets
    • None
    • mac os 10.13, 10.12, 10.14
    • macOS
    • c4e7f3ab6555c87fb41c5f341524445283720e6a (qt/qtbase/5.12)

    Description

      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( "color: blue;" "background-color: yellow;"

      "selection-color: yellow;" "selection-background-color: blue;" ); 

      Attachments

        Issue Links

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

          Activity

            People

              tpochep Timur Pocheptsov
              waterblue lee ning
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes