PDA

View Full Version : partly transparent dockwidget



fi0r
11th June 2010, 20:03
Hi,

I'm using two Dockwidgets one left one right, each docked. I'd like to have them both docked without filling the whole vertical space. When i change their size it shows only effect when non docked, so i tried to make their background transparent.
I tried


setBackgroundRole(QPalette::NoRole);
setWindowOpacity (0.5);
setAttribute(Qt::WA_TransparentForMouseEvents);
setAttribute(Qt::WA_TranslucentBackground);
and the setBrush on the background which just drawed the background black instead of transparent when non docked


and the setMask code from
t-qdialog-w-transparent-backgroundl (http://www.qtcentre.org/forum/f-qt-programming-2/t-qdialog-w-transparent-background-3757.html)

but none of it worked

is there any other possibility to adjust the size of a docked widget or setting its transparent?

tbscope
11th June 2010, 20:24
If you want to set the transparency on a docked widget, this will most likely work but it won't give you anything useful. There's nothing behind the dock widget, so it's useless.

Changing the dock area size is not supported either. It's like an oversized toolbar.

wysota
11th June 2010, 23:55
Actually in some cases it is possible to change the size of a dock widget (look in the docs for details). Although I agree it is difficult to control.