Hi all,
I have one strange question that I'm trying to solve in the best way, so
I would be happy if someone gives me wise ideas :)
I want to create something like singleton wrapper over QML object. My
use-case is this:
1. I want to have one native c++ object, exposed as QML element.
2. I want to have my wrapper QML item, that I can use in as many places
as I want - let's call it Wrapper {}
3. I want this wrapper to be pointer to the one instance, that I will
place somewhere on the top, so it's always visible.
4. I want to create such wrapper objects on the fly
5. I don't want my wrapper to cover all the native object methods and
properties
Why I want to have my wrapper at all? - it's because form time to time I
want to change the size, or re-position it or use anchors or whatever I
want to do with it - but just resizing and anchoring stuff. Everything
else I want to have from the main object.
There is one solution I have for now - I can use this global object and
wrap it with my - so mainly I will have one instance that I know and
will just the parent of it with my wrapper one, so it's visible there.
But this way I need to wrap all methods and functions that are in the
main class - which I don't want to have.
I'm looking for something like "transparent-wrapper".
I would appreciate any ideas how to do it better.
Thanks in advance,
Ivo
_______________________________________________
Qt-qml mailing list
[email protected]
http://lists.qt.nokia.com/mailman/listinfo/qt-qml