Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Child widget with transparent background for a widget with Qt::WA_PaintOnScreen set true.

    General and Desktop
    1
    1
    1173
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • V
      Varun_pts last edited by

      I want to create a transparent treewidget on top of a widget which has Qt::WA_PaintOnScreen set to true since it is drawn by external rendering engine. (Overriding its paintevent)

      As per the documentation, widgets which have Qt::WA_PaintOnScreen attribute set to true, cannot be semi-transparent or shine through semi-transparent overlapping widgets.

      Is there any other work around.

      I created a separate window(widget that does not have a parent) and set its windowflag to Qt::SubWindow, Qt::WindowStaysOnTopHint, made it transparent and overlapped it on the mainwindow to make a tranparent tree. But this calls for additional handling since this is now a separate window. I have to mange position of this window, focus, etc myself. I was wondering if there was any simple way to accomplish the same thing.

      Please help.

      1 Reply Last reply Reply Quote 0
      • First post
        Last post