First of all I am glad that you found a solution you're happy with.
Nevertheless, I still recommend to use GridView. On the one hand, it probably reduces your amount of code, on the other hand, and most importantly, it's much more readable to you and every other developer, who might want to help you or needs some Inspiration, because he has the same problems as you have.
To your question:
On of the key features of Qml is property binding. So let's say you have
If you click the applicationWindow its width will be decreased by 10 and its height increased by 10. At the same time the rectangle's width will be decreased by 5 and its height increased by 5. That's because its size depends on the size of the applicationWindow and will be changed automatically.
Same applies to your case. If the model changes its size, your ListView should notice this and update the list.
Just in case you don't know (or if it's working in your case, didn't know how your model looks like) you can do:
or if it's a List of Arrays/Vectors
Index should be available through the outer ListView if I did understand you correctly.
@VRonin yes - it's a list of QObject*
each entry describes a File:
Type (Image, Video, PDF, ...)
Name (obsolet for iOS Photos)
entries (if Folder)
and I'm constructing the collection per ex. from
PHFetchResult *smartAlbums = [PHAssetCollection fetchAssetCollectionsWithType:PHAssetCollectionTypeSmartAlbum subtype:PHAssetCollectionSubtypeAlbumRegular options:nil];
Ok thx, i've also found a very detailed solution on stackoverflow on how to use a parent above evrything to display a component on top.
I didn't know about the ToolTip component. i might endup using it since it has the same purpose as what I did but probably more efficient and more weird-case-proof. So thank you for your answser.
but how I should acces particular rectangles then?
With the model approach it wont be required. The delegate items will get the data from model. Also when required you just need to update the model with new data from the delegate or from outside.
For eg. ListModel has several methods to access the data.
For Now MyClass has only image path, but it will also set state (checked-unchecked) and animation (enable-disable).
I would like to reload this QList ( with another images, states etc. ) when button ( one of three ) is clicked ( TButton.qml ).
How to do it ? Please help.
I figured out why the GridView wasn't scrolling. I'm still having issues with the transitions as I described, but I don't think that's really a reasonable question to ask here at this time...so that's why I deleted the post.