How to do grahics options with QML



  • I want to make a application for image options , including some basic options of photoshop , like clipping the image with rectangle or round , add some comment to the image , if I don't use QML , I can use QPainter to draw on it , while now I want to use QML to do it , do you guys have some good solutions ?thanks very much ~~



  • I don't think any thing similar to QPainter is available in QML. The purpose of qml as I see it is not to do low level painting, its more like building up on the existing simple qml items/components.



  • In order to manipulate the image, you need to use QPainter, qml can't do image manipulation. You can create your interface in qml however and create a qml item that exposes the painting functionality by using signals and slots and properties.



  • thanks Vijay and sigrid , currently my solution is to implement a widget inheriting from QGraphicsProxyWidget , and export it to QML with qmlRegiesterType


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.