Hello! I'm porting our Quick 1 application to Quick 2. In our application we had an triangle shaped item with a clipping path. All child Items in QML (e.g. our Buttons) will be clipped to that triangular shape
//in C'tor: this->setFlag(QGraphicsItem::ItemHasNoContents, false); this->setFlag(QGraphicsItem::ItemClipsChildrenToShape, true); //in paint just drawing the triangle painter->drawPath(m_painterPath); but the most important thing was overriding the QGraphicsItem::shape() method which returned the triangular shape which Quick 1 would use for clipping But how would I do that with a QQuickItem? I've ported the drawing of the triangle by overriding QQuickItem::updatePaintNode. There I'd return a QSGClipNode which would perform the nessesary clipping, but this will only clip the SG-children. But QML child Items won't be scene graph children. Does anyone have a solution? br Richard _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest