GridView with sections
Solved
QML and Qt Quick
-
@FOXLISIN As you can see there is no
section
built-in property forGridView
so it is not possible to use sections there. But you can always try to create your own custom elements to suit yur needs :)
Btw. can you explain what you re trying to achieve ? -
@FOXLISIN I think it could be achieved using
ListView
with delegate as a component containingGridView
.And for example c++ model can be looked like:
class MyModel : public QAbstractListModel { ... // Some implementation ... QVector<SubModel*> m_subModels; }; class SubModel : public QAbstractListModel { ... // Some implementation ... QString m_sectionName; QVector<EmojiItem*> m_emojis; };
-
Thank you guys @p3c0 @medyakovvit
I'll try to implement it as you say