You may utilize "opacity" property, e.g.

Rectangle {
 id: window
 width: 800
 height: 600
 opacity: 0.5
}


2010/11/23 Elliot Smith <elliot.sm...@intel.com>

> I am trying to figure out if there is a way to create a semi-transparent
> main application window in a QML application.
>
> I've tried setting the color property on my main rectangle like this:
>
> Rectangle {
>  id: window
>  width: 800
>  height: 600
>  color: "transparent"
> }
>
> and also tried "#00000000", but both come up as a solid white block when
> run under the qmlviewer.
>
> I've also tried the -opengl and -frameless flags to qmlviewer in
> desperation, but I guess these won't make any difference (I thought
> maybe the white background was from some default window or maybe because
> I'm not using OpenGL, but I was clutching at straws).
>
> Do I need to create a QtDeclarativeView of my own and run the QML app
> inside that to get a semi-transparent application?
>
> For reference, I'm using an Intel graphics chipset and running Fedora 13
> with Qt Creator 2.0.1 and Qt 4.7.0 (MeeGo variants, which are fairly
> standard AFAIK).
>
> Thanks.
> 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.
>
> _______________________________________________
> Qt-qml mailing list
> Qt-qml@trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-qml
>
_______________________________________________
Qt-qml mailing list
Qt-qml@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-qml

Reply via email to