Note that there are some explanatory texts on larger screens.

plurals
  1. POQML:Transparency for an rectangle is not working
    text
    copied!<p>How to set transparency of an rectangle/screen.</p> <p>I have Following code:</p> <pre><code>// main.cpp void main(int argc, char*[] argv) { QApplication::setGraphicsSystem("raster"); QApplication app(argc, argv); QDeclerativeView view; view.setSource(QUrl::fromLocalFile("loaderTest.qml")); view.setResizeMode(QDeclarativeView::SizeRootObjectToView); view.showFullScreen(); //QRegion mask(10, 10, 100, 100); //view.setMask(); view.show(); app.exec(); } </code></pre> <p>And QML file is:</p> <pre><code>//loaderTest.qml Rectangle { id: mainRectangle width: 1000 height: 700 color: "transparent" //color: "#00000000" Image { id: image1; width: 348; height: 155; anchors.horizontalCenter: parent.horizontalCenter; anchors.verticalCenter: parent.verticalCenter; source: "test.png" } Loader { id: mainLoader anchors.fill: parent; source: ""; focus: true; } } </code></pre> <p>I have one loader and one image in this screen and background color is transparent. When i run this application it should display transparent background with image in the center (as i have not set loader source).</p> <p>but what i am getting is image in center with white background filled in the screen, I don’t know who is filling in this white background color as i have mentioned transparent color as background.</p> <p>I am using QT.4.7.0 and Linux.</p> <p>I have two planes on my target system one is Video plane and another is graphics plane, when i run GUI with transparent background (set transparency at video place) it should display video on Video place in above example it is showing background as white, as it should have displayed video playing on Video plane.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload