How to declare list property in QML

Timmmm picture Timmmm · Nov 4, 2014 · Viewed 18k times · Source

How do I declare a list property in QML (for use with Qt.labs.settings in my case):

Settings {
    property list recentFiles: []
}

Does not work. I've tried many other options: list<string>, string[], etc. None seem to work.

Answer

fat picture fat · Sep 21, 2015
Settings {
    property var recentFiles: []
}

http://doc.qt.io/qt-5/qml-var.html