[Qt-qml] Qml extending with QGraphicsWidgets
alexis.menard at nokia.com
alexis.menard at nokia.com
Tue Jul 13 17:33:15 CEST 2010
On Jul 13, 2010, at 17:09, ext kate.alhola at nokia.com<mailto:kate.alhola at nokia.com> wrote:
I have tried to make small example that adds QGraphicsWidget based Graphical widget to Qml.
Basically code is very similar than "musician" example but my widget also implements paint() function.
I have put qDebug in my code and constructor and set property ( setName() ) get called but paint()
won't get called at all.
I tried to find some example of graphic QGraphicsWidget but least i did not find any with google.
Option 1 : examples/declarative/cppextensions in the Qt source tree.
Option 2 : Plasma-mobile on KDE. websvn.kde.org/trunk/playground/base/plasma/shell/plasma-mobile<http://websvn.kde.org/trunk/playground/base/plasma/shell/plasma-mobile>
Qml fragment creating widget is
¨Rectangle {
x:200
y:20
border.width:1
border.color:"black"
width: 60; height: 100
GaugeBand {
anchors.fill: parent
name: "MiuMau"
}
}
The bounding rectangle gets painted with white color inside but painter of my Widget gets never called.
Kate
<ATT00001..txt>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt.nokia.com/pipermail/qt-qml/attachments/20100713/b26a6a5f/attachment.html
More information about the Qt-qml
mailing list