Child widget with transparent background for a widget with Qt::WA_PaintOnScreen set true.
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.