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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P3: Somewhat important 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)

      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;" ); 

        1. bug .png
          24 kB
          lee ning
        For Gerrit Dashboard: QTBUG-72428
        # Subject Branch Project Status CR V

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes