Hi,
AFAIK, you can’t use QImage as QML element using Q_PROPERTY.
Use qquickimageprovider [qt-project.org].
Or
You can use QUrl and then expose its setter getter using PROPERTY.
ie.
Q_PROPERTY(QUrl imagePath READ imagePath WRITE setImagePath NOTIFY imagePathChanged)
and once the path is set from the QML element access it from the cpp and load [qt-project.org] the image.
↧









