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

    • Bug
    • Resolution: Fixed
    • P3: Somewhat important
    • 6.1.0 Beta 1
    • 4.6.0, 4.6.1
    • Widgets: Style Sheets
    • None
    • 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

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: