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

QSplitter with layout will use stylesheets incorrectly

    XMLWordPrintable

Details

    Description

      I've performed a simple test where I apply one long Style Sheet to the
      main form for all the widgets in the application, where I distinguish
      them by a custom property that I have added.

      My Style Sheets looks as follows:

      QLabel

      { color:blue; }

      QLabel[ParamStyle="Param"]

      { font-size: 50pt; font-weight: bold; color:black; }

      QLabel[ParamStyle="Title"]

      { color: gray; font-size:14pt; }

      QLabel[ParamStyle="Unit"]

      { color: gray; font-size:10pt; }

      My special labels has this property sets.

      This works great all over the form with layouts and frames.

      It breaks when I tried to apply though a splitter.

      When the splitter has any kind of layout applied to it, the
      more general directive takes over and I see all my labels in blue
      regardless of there property ParamStyle.
      It looks correct on the Designer preview, and looks wrong when the application runs. When I remove the layout it looks fine on both. Also if I remove the general directive
      (the first one on the top that applay to all QLabel) and still use the layout I get a good result for the ParamStyle labels, but of course I looses the blue color.

      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)
            janichol Andy Nichols
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes