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

Make QStyleSheetStyle::baseStyle public

    XMLWordPrintable

Details

    • All

    Description

      Even though it's not a real QProxyStyle, the private QStyleSheetStyle almost behaves as such, and also actually has a baseStyle() getter like QProxyStyle does; unfortunately, it's not really public (at least not from Python).

      Since the QSS style may alter some aspects but not others, and being aware about that could be useful in subclasses, it may be relevant to know the underlying style in some cases. For instance, the QSS style may only change some palette roles or the font (therefore the WA_StyleSheetTarget may not be a sufficient hint), possibly only for one of its pseudo states or even just for its subcontrols.

      Being able to retrieve the base style is quite relevant, as it can be used as a reference comparison with the QSS/base style functions, or even decide if/how/when alter the behavior of subclassed overrides based on the QSS or the base style behavior.

      I suggest to make baseStyle() a virtual for QStyle (defaulting to itself), with QProxyStyle behaving as before, so that QStyleSheetStyle can properly return its base style as well.

      Attachments

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

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            musicamante Maurizio Berti
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes