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

QGraphicsView with Qt::WA_TranslucentBackground + Qt::WindowStaysOnTopHint no longer let mouse events pass through the background

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 5.13.1
    • Fix Version/s: None
    • Component/s: Widgets: GraphicsView
    • Labels:
      None
    • Platform/s:
      macOS

      Description

      Context : Migrating code from Qt5.5 to Qt 5.13

      The same code that still works on Linux and Windows no longer works on Mac (it worked with Qt 5.5) : 

       

      mTransparentDrawingView->setAttribute(Qt::WA_TranslucentBackground, true);
      #ifdef Q_OS_OSX
          mTransparentDrawingView->setAttribute(Qt::WA_MacNoShadow, true);
      #endif
      mTransparentDrawingView->setWindowFlags(Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint | Qt::Window | Qt::NoDropShadowWindowHint | Qt::X11BypassWindowManagerHint);
      
      

      The expected result is that the mouse events can pass through the transparent background, like in Ubuntu, and Windows. 

      Issue encountered on 10.14.6 (but same issue with Qt 5.9.5 and High Sierra)

       As you can see below, I can see QtCreator behind the transparent background, but I can't click though the background and interact with QtCreator. When I try to click on, the Mac menus and docks disappear and nothing happens, like if I had clicked on the background or in an object on the background.

       

       

       

       

        Attachments

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

          Activity

            People

            Assignee:
            bibr Andreas Aardal Hanssen
            Reporter:
            kamui kamui
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes