Accessing Qlist within a Qlist and Deallocating them through Qml
Hi All,
I have the following classes
- {
- Q_OBJECT
- }
and
- class ListofLists : public SourceSinkObj
- {
- Q_OBJECT
- Q_PROPERTY(quint32 ID READ ID WRITE setID NOTIFY IDChanged)
In my main .cpp
I have the following where listSinkClasses is a Vector
- for (int i=0 ;i < listSinkClasses.size() ;i++)
- {
- am_SinkClass_s tempSinkClass;
- tempSinkClass= listSinkClasses.at(i);
- ListofLists* TempSinkMaster = new ListofLists();
- quint32 TempID= tempSinkClass.SinkClassID;
- TempSinkMaster->setID(TempID);
- SinkMasterlist.append(TempSinkMaster);
- }
Please let me know
1 How do i iterate through the Qlist in Qml
2.How do i deallocate memory on button click in qml. As the function to deallocate would be in main .cpp I can not use Q_INVOKABLE
Thanks and Regards
0 replies
You must log in to post a reply. Not a member yet? Register here!
