How to implement UIImageView-like component?
-
There is one "image" property in UIImageView. "image" is a UIImage object.
pixel data can be accessed via "image" property. Therefore image processing tasks can be performed by using "image" property as a input and then new UIImage object can be assigned to "image" property. The UIImageView will be updated automatically after new UIImage is assigned.How to implement "image" property in my custom Image component?
-
Subclass QQuickItem, add a Q_PROPERTY with relevant getters and setters, and you should be fine. But I have a feeling I have misunderstood you.
-
Thank for your quick reply.
Is it feasible? It seems difficult in this way because in this way I need to reimplement Image component completely in order to get all features of built-in Image component.
How to avoid reimplementing Image component completely?
-
Subclass the private class that creates the Image QML type. This, however, means you need to use custom build of Qt.
-
Thanks again.
I am going to propose making QQuickImage public.
-
Has been done maaaany times already :) But keep trying and one day it might be made public :)