[Qt-interest] transparent mainwindow and non transparent widget

Ramesh ramesh.bs at robosoftin.com
Fri Jul 9 08:39:30 CEST 2010


Override the paint event of the window to which you want to make transparent
and perform the draw operation (i.e draw the transparent rect by setting the
opacity)..

-----Original Message-----
From: qt-interest-bounces at trolltech.com
[mailto:qt-interest-bounces at trolltech.com] On Behalf Of Bart Swinnen
Sent: Friday, July 09, 2010 11:59 AM
To: qt-interest at trolltech.com
Subject: Re: [Qt-interest] transparent mainwindow and non transparent widget

On 9/07/2010 7:49, Pritam Ghanghas wrote:
>
> By default most of the widgets are transparent. I mean their
> autoFillBackground property is false except for QMainWindows (native
> widgets I guess). if you want them non transparent you can set it to
> true with setAutoFillBackground().
>
> For making QMainWindow, I have always used
> setStyleSheet("background: transparent");
>
>

When using setStyleSheet("background: transparent");
It sets the background of the mainwindow to black on my WinXP.
Is there something else to set to have it transparent?
BTW: I'm using 4.7 beta2
_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest


-----------------------------------------------
Robosoft Technologies - Come home to Technology

Disclaimer: This email may contain confidential material. If you were not an intended recipient, please notify the sender and delete all copies. Emails to and from our network may be logged and monitored. This email and its attachments are scanned for virus by our scanners and are believed to be safe. However, no warranty is given that this email is free of malicious content or virus.



More information about the Qt-interest-old mailing list