PDA

View Full Version : QMenu stylesheet and alpha coloring



StaticPhilly
23rd May 2010, 21:54
hello all,

I have a QMenu, now in my stylesheet iv tryed:

QMenu
{
background: rgba(0, 0, 0, 120);
}
Now i was hoping it would give a semi-transparent background on the drop down menu, so you could half see the applications qwidget below it.

However what the above does is makes the background without alpha, basiclly its just blank rather then a semi-transparent black.

can oneone point me in the right direction on achiving this or tell me were im going wrong.

thanks,
Phil

papius_vtualetius
11th October 2010, 16:38
use this:

QMenu * myMenu = new QMenu;
myMenu->setWindowOpacity(0.8);