carlossst
8th February 2011, 20:30
Hello,
I am using qmlifyproxy library (http://www.qtcentre.org/wiki/index.php?title=QMLifyProxyModel) to call a model written in C++ that displays a Grid of images. Until now images are displayed fine.
My problem is: I cannot give to the "model: MemoryModel" sentence in the code piece below an id property visible for QML to enable access to the model properties (in my case I need to use "get" and "move" properties as detailed in the main.qml code).
when I write the model call sentence in the code below with:
model: memoryModel
there are no errors obviously, but it does not work because I cannot access the properties
But, the code below:
5880
with the sentence:
model: memoryModel { id: icons }
to enable access to use the properties, I get the following error:
file:///../SQLListViewProxy-build-desktop/qml/SQLListViewProxy/main.qml:15:14: Expected type name model: memoryModel { id: icons}
and I can not continue...
To clarify, my question is: How is it possible in a model created in C++ to give an id property visible from QML to enable access to the model properties as "get" or "move"?
main.cpp where "memoryModel" is referred is attached.
memoryitem.qml to provide more context info, also.
Cheers,
Carlos
I am using qmlifyproxy library (http://www.qtcentre.org/wiki/index.php?title=QMLifyProxyModel) to call a model written in C++ that displays a Grid of images. Until now images are displayed fine.
My problem is: I cannot give to the "model: MemoryModel" sentence in the code piece below an id property visible for QML to enable access to the model properties (in my case I need to use "get" and "move" properties as detailed in the main.qml code).
when I write the model call sentence in the code below with:
model: memoryModel
there are no errors obviously, but it does not work because I cannot access the properties
But, the code below:
5880
with the sentence:
model: memoryModel { id: icons }
to enable access to use the properties, I get the following error:
file:///../SQLListViewProxy-build-desktop/qml/SQLListViewProxy/main.qml:15:14: Expected type name model: memoryModel { id: icons}
and I can not continue...
To clarify, my question is: How is it possible in a model created in C++ to give an id property visible from QML to enable access to the model properties as "get" or "move"?
main.cpp where "memoryModel" is referred is attached.
memoryitem.qml to provide more context info, also.
Cheers,
Carlos