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

QProxyStyle: When setting a style that is a subclass of QProxyStyle on a widget, then this will have the effect of influencing other widgets using that same base style

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3: Somewhat important
    • Resolution: Fixed
    • Affects Version/s: 4.6.0, 4.6.1
    • Fix Version/s: 6.1.0 Beta 1
    • Component/s: Widgets: Style Sheets
    • Labels:
      None
    • Commits:
      1bcfada9f04bd20a7a64d448fbf60c0f0820ed09

      Description

      QProxyStyle: When setting a style that is a subclass of QProxyStyle on a widget, then this will have the effect of influencing other widgets using that same base style. This is because in order for QProxyStyle to work, it calls setProxy() on the base style, therefore, if you did:

      widget->setStyle(new MyProxyStyle(widget->style());

      and the widget was using QApplication::style(). Then it will cause the whole application to be changed to use the proxy style.

      Example is attached which shows both tableviews having horizontal headers with the style applied, but setStyle() was only called on one of them.

        Attachments

        For Gerrit Dashboard: QTBUG-8004
        # Subject Branch Project Status CR V

          Activity

            People

            Assignee:
            chehrlic Christian Ehrlicher
            Reporter:
            andysh Andy Shaw
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes