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

Background color of promoted QWidget does not show

    XMLWordPrintable

Details

    Description

      I have Qt 4.7 under VC2008 (Windows7-32b) and QtCreator 2.1beta under Mac OSX 10.6.
      I placed 2 QWidgets into a tabbed-widget in a MainWindow and changed their background color in Designer (e.g. "background: khaki;"). When I run my program at this point I can see the background colors.
      I then promoted the 2 Widgets to my own classes derived from QWidget and the background colors still show in Designer but when I run the program I cannot see the background colors anymore. This is consistent under Mac OSX and Windows.

      I tried to set the background in the widget classes with "setStyleSheet()" and in an external .qss stylesheet. But nothing worked. I can though set other CSS styles like "Margin" and "Padding" etc..

      "autoFillBackground" has no noticeable effect on the background color of the Widget.

      I have no idea if that worked with previous Qt version or not, but since I used 4.7 beta it doesn't.

      Added a test case: VC2008 Project.

      Attachments

        1. WidgetTestCase.zip
          165 kB
          Pat Le Cat
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            bachewii Jens
            patlecat Pat Le Cat
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes