[Qt-qml] Qml extending with QGraphicsWidgets
alexis.menard at nokia.com
alexis.menard at nokia.com
Wed Jul 14 10:59:00 CEST 2010
On Jul 14, 2010, at 10:21, ext Christian Kamm wrote:
> On Tuesday 13 July 2010 18:29:48 Alhola Kate (Nokia-CD/Helsinki) wrote:
>> Is there some extra property that need to be set compared traditional
>> c++ QGraphicsView items to get it displayed in Qml ? I tested that if I
>> just add my widget to normal QGraphicsScene, it gets displayed and both
>> paint() and boundingRect() get called.
>
> I've run into this myself; setting
> setFlag(QGraphicsItem::ItemHasNoContents, false);
> in your item's constructor should do it.
Well if you inherits from QDeclarativeItem yes probably. But from QGraphicsWidget it's not needed.
>
> Cheers,
> Christian
> _______________________________________________
> Qt-qml mailing list
> Qt-qml at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-qml
More information about the Qt-qml
mailing list