Why item flags exist in Models in Qt?
-
I am trying to understand why there is item flags in Qt models. Seems that it is unused all the time in all QML views with custom delegates. At the same time, user can substitute this properties with just normal
data(..., isCheckableRole)
.
https://doc.qt.io/qt-5/qt.html#ItemFlag-enumWhat is the sence of this item flags?
-
Hi
It allows a model to change the default items flags overwriting
the virtual flags method of the model without having to ask the user to set
on each item.
https://doc.qt.io/qt-5/qabstractitemmodel.html#flags