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

QWindow wrapped by createWindowContainer() become invisible when Qt::WA_TranslucentBackground is set.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.8.0
    • None
    • Windows7/10

    Description

      Say we has a QWindow called 'W', and we use createWindowContainer() to wrap it into a QWidget 'A'. 'A' has a parent widget 'P'.

      Everything goes perfect until we put the following code in the parent 'P':

          this->setAttribute(Qt::WA_TranslucentBackground);
          this->setWindowFlags(Qt::FramelessWindowHint);
      

      after that, the 'A' is still OK, but the 'W' turned to invisible.

      What we need is both 'A' and 'W' are visible after the parent's background is gone.

      What's going on here? Does this a known bug to Qt?

       

      EDIT:

      FYI, we are trying to implements a shadow like this: https://stackoverflow.com/a/15757358/2010078,

      but we have a child QWindow indeed, so if we drop the shadow like that, our QWindow is invisible.

      Attachments

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

        Activity

          People

            esabraha Eskil Abrahamsen Blomfeldt
            billhoo Bill Hoo
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes