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

QTextEdit wrong background color when stylesheet changes margin or padding

    XMLWordPrintable

Details

    Description

      Setting a stylesheet that changes the margin or padding will cause QTextEdit to draw the background using QPalette::Window instead of QPalette::Base.

      Here is a code snippet that will show the issue:

      #include <QtGui>

      int main(int argc, char *argv[])
      {
      QApplication app(argc, argv);
      QTextEdit edit;
      edit.setStyleSheet("QTextEdit

      { margin: 10px; }

      "); // Wrong background
      //edit.setStyleSheet("QTextEdit

      { padding: 10px; }

      "); // Wrong background
      //edit.setStyleSheet("QTextEdit

      { font-style: italic; }

      "); // OK
      edit.show();
      return app.exec();
      }

      Attachments

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

        Activity

          People

            goffart Olivier Goffart (closed Nokia identity) (Inactive)
            xcm Martin Petersson (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes