How to implement UIImageView-like component?
-
wrote on 20 Sept 2013, 09:00 last edited by
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.
-
wrote on 20 Sept 2013, 09:43 last edited by
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.
-
wrote on 20 Sept 2013, 10:22 last edited by
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 :)
1/6