[Qt-interest] QML: transparent image

Nicholas Shatokhin n.shatokhin at gmail.com
Wed Aug 10 01:16:27 CEST 2011


Hello.

I create a qml file:

  import QtQuick 1.0

  Image {
      width: 130; height: 100
      fillMode: Image.PreserveAspectFit
      smooth: true
      source: "animation.png"

      RotationAnimation on rotation {
          loops: Animation.Infinite
          from: 0
          to: 360
	 duration: 2000
      }
  }

image has a transparent background. Next, I add it to layout:

QDeclarativeView * qmlView = new  
QDeclarativeView(QUrl::fromLocalFile("animation.qml"), this);

mainLayout->addWidget(qmlView);

But image showing in white box. How can I do it transparent (image must be  
showing on form, without background)?

-- 
За використання революційного клієнта електронної пошти Opera:  
http://www.opera.com/mail/



More information about the Qt-interest-old mailing list