Wednesday, 15 May 2013

Qt Window with transparent background image -



Qt Window with transparent background image -

i placed background image this:

setwindowflags(qt::framelesswindowhint); qpixmap slika("some_image.png"); qpalette paleta; paleta.setbrush(this->backgroundrole(), qbrush(slika)); this->setpalette(paleta);

if create image transparent, when application loads, blink , disappear. if create image no transparency, ok. why qt refuses utilize transparent image?

i don't know utilize case this, can seek using setstylesheet method create background transparent.

setstylesheet("background:transparent;"); setattribute(qt::wa_translucentbackground); setwindowflags(qt::framelesswindowhint);

hope helps.

qt

No comments:

Post a Comment