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

Fusion + stylesheet setting linear gradient as background changes border color

XMLWordPrintable

    • Windows

      Giving app fusion style and then setting linear gradient as background changes the line edit border color.

      Test #1: background-color as solid color:

          QLineEdit *lineEdit1 = new QLineEdit;
          lineEdit1->setStyleSheet("QLineEdit { background-color: #ff0000; }"); 

      => No problem.

      Test #2: background-color as linear gradient

          QLineEdit *lineEdit2 = new QLineEdit;
          lineEdit2->setStyleSheet("QLineEdit {background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0, stop: 0 #ff0000, stop: 0.499 #ff0000, stop: 0.5 #00ff00, stop: 1 #00ff00);}"); 

      => The border color suddenly changes to black

      NOTE: This is a lot easier to see when using LIGHT mode on Windows.

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

            tpochep Timur Pocheptsov
            miikapernu Miika Pernu
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes