How can be made available the members of QDir::SortFlag to a QML script? For instance, how to fill up a combo from a QML script with the members of QDir::SortFlag enum or QDir::SortFlags in order to choose some sort criterium? Is this available through some C++ custom enum in a custom class only?
Asked
Active
Viewed 184 times
0
-
Have you looked into `FolderListModel`? Maybe not exactly what you ask, but related and perhaps usable in some other way (the flags are available as boolean properties) – Amfasis Jul 02 '19 at 19:33
-
Thank you, but I need more than that. – mike Jul 03 '19 at 04:59
-
Possible duplicate of [How to access C++ enum from QML?](https://stackoverflow.com/questions/20089196/how-to-access-c-enum-from-qml) – folibis Jul 03 '19 at 08:07
-
Yes and no. I was interested in the fact that some QT enum, already existing and not defined by me, is accessible by design. Seemingly not, although I was expecting that. Eventually, that article solution is a technical answer to my question, but I have knew that approach and thus I have referred to this kind of technique as "custom calss or enum". It's overkill, IMHO, a good subject of a feature request to QT, at least for the enums. – mike Jul 04 '19 at 05:06