diff --git a/examples/quick/quickwidgets/quickwidget/quickwidget.pro b/examples/quick/quickwidgets/quickwidget/quickwidget.pro index 1aca220..2c0cdb9 100644 --- a/examples/quick/quickwidgets/quickwidget/quickwidget.pro +++ b/examples/quick/quickwidgets/quickwidget/quickwidget.pro @@ -4,5 +4,6 @@ TARGET = quickwidget TEMPLATE = app SOURCES += main.cpp - +CONFIG+=console RESOURCES += quickwidget.qrc +OTHER_FILES=rotatingsquare.qml diff --git a/examples/quick/quickwidgets/quickwidget/rotatingsquare.qml b/examples/quick/quickwidgets/quickwidget/rotatingsquare.qml index a5becfb..fd381e1 100644 --- a/examples/quick/quickwidgets/quickwidget/rotatingsquare.qml +++ b/examples/quick/quickwidgets/quickwidget/rotatingsquare.qml @@ -39,22 +39,31 @@ ****************************************************************************/ import QtQuick 2.0 +import QtGraphicalEffects 1.0 Rectangle { id: root - - Rectangle { - property int d: 100 - id: square - width: d - height: d - anchors.centerIn: parent - color: "red" - NumberAnimation on rotation { from: 0; to: 360; duration: 2000; loops: Animation.Infinite; } + Item { + id: obj + anchors.fill: parent + Rectangle { + property int d: 100 + id: square + width: d + height: d + anchors.centerIn: parent + color: "red" + NumberAnimation on rotation { from: 0; to: 360; duration: 2000; loops: Animation.Infinite; } + } + Text { + anchors.centerIn: parent + text: "Qt Quick running in a widget" + } + visible: false } - - Text { - anchors.centerIn: parent - text: "Qt Quick running in a widget" + Desaturate { + source: obj + anchors.fill: obj + desaturation: 1 } }