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

Cannot make transparent (translucent) background using Qt styles

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • P2: Important
    • None
    • 5.0.0
    • Widgets: Styles
    • None
    • Windows 7 x64

    Description

      I have used the Qt widgets->styles example to test this functionality. The only change i have made is that in void NorwegianWoodStyle::polish(QWidget *widget) method i have added two lines of code:-

      if(widget->isWindow())

      { widget->setWindowFlags( Qt::FramelessWindowHint ); widget->setAttribute( Qt::WA_TranslucentBackground ); }

      However the output is not what i have expected. its showing output with black background. However when building the same example with Qt 4.8 I am able to see the transparent background. The following screenshots in the attachment section will help you more in understanding the problem.

      Attachments

        1. Qt_4_8_Output.PNG
          Qt_4_8_Output.PNG
          63 kB
        2. Qt5_7_output.PNG
          Qt5_7_output.PNG
          45 kB
        3. styles.zip
          26 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            mmutz Marc Mutz
            alexandria1995 Alexandria Pierce
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes