From 29559bb440529e4afd766cad61578947e86fa948 Mon Sep 17 00:00:00 2001 From: Alan Alpert Date: Thu, 13 May 2010 16:41:42 +0200 Subject: Note that you need to unset a flag to create a visual item This needs to be documented as long as its true, or else it's a common source of confusion when writing QML items. --- src/declarative/graphicsitems/qdeclarativeitem.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/declarative/graphicsitems/qdeclarativeitem.cpp b/src/declarative/graphicsitems/qdeclarativeitem.cpp index 9433ba0..f251ba1 100644 --- a/src/declarative/graphicsitems/qdeclarativeitem.cpp +++ b/src/declarative/graphicsitems/qdeclarativeitem.cpp @@ -1194,7 +1194,10 @@ QDeclarativeKeysAttached *QDeclarativeKeysAttached::qmlAttachedProperties(QObjec width and height, \l {anchor-layout}{anchoring} and key handling. You can subclass QDeclarativeItem to provide your own custom visual item that inherits - these features. + these features. Note that, because it does not draw anything, QDeclarativeItem sets the + QGraphicsItem::ItemHasNoContents flag. If you subclass QDeclarativeItem to create a visual + item, you will need to unset this flag. + */ /*! -- cgit v0.12