[Qt-qml] Semi-transparent applications
Elliot Smith
elliot.smith at intel.com
Tue Nov 23 13:13:26 CET 2010
On Tue, 2010-11-23 at 12:04 +0000, Tomas Junnonen wrote:
> On 11/23/2010 01:44 PM, ext Elliot Smith wrote:
> >
> > Do I need to create a QtDeclarativeView of my own and run the QML app
> > inside that to get a semi-transparent application?
>
> Yes, in addition to setting the top-level QML element to the transparent
> color like you already did.
>
> Here's a the minimal transparent app C++ stub:
>
> QDeclarativeView view;
>
> QPalette palette;
> palette.setColor(QPalette::Base, Qt::transparent);
> view.setPalette(palette);
> view.setAttribute(Qt::WA_TranslucentBackground);
>
> view.setSource(QUrl::fromLocalFile("main.qml"));
> view.show();
Great, thanks for helping.
Elliot
--
Elliot Smith
Intel Open Source Technology Centre
---------------------------------------------------------------------
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ
VAT No: 860 2173 47
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
More information about the Qt-qml
mailing list