PDA

View Full Version : QWidget from Designer--Paint or set foreground



augusbas
20th June 2011, 13:05
Hi all,

I have added a QWidget from the designer, to my .ui (MainWindows)

My class is derived from Qmainwindows , didn't subclass Qwidget

I can able to set the background image :


PPI_Window->setStyleSheet(" background-image: url(/airport-4975m.jpg);");

I need to set/draw the foreground image and set the opacity to it...

How can i achieve this.

Rachol
20th June 2011, 13:53
Set another widget on top of your PPI_Windowand and set semi-transparent background.

augusbas
21st June 2011, 08:12
Hi Rachol,

Please refer the image attachment on how my application works..

As you said i put another widget (on the extreme right with blue map ) on top of my lower widget , where i am displaying my graphics from third party i pass window id of the lower widget ....But still the graphics is drawn on the top widget too.....

hope you remember we have discussed the same...

how this can be resolved ......The same kind of application i had in X Code....By using "xsetforeground" call they set the transparency so the object is visible on top of graphics ....Couldn't able to get, how it can be achieved in Qt