-
Bug
-
Resolution: Out of scope
-
P2: Important
-
None
-
4.8.2
-
None
-
Win'7 MinGW
Please take a look at the following code:
//Host.qml import QtQuick 1.1 Item { id: host //This gives two errors (hinting to "["): //"Expected token `numeric literal'" //"Expected a qualified name id" // //property list<Item> screens: [] //This gives two errors (hinting to "<" and ">" respectively): //"Unexpected token `<'" //"Expected token `:'" // //default property list<Item> screens //This breaks too, with same errors as in above case // //default property list<Item> screens: [] //This works property list<Item> screens default property alias screensProperty: host.screens } //test.qml import QtQuick 1.1 Host { Item { objectName: "first" } Item { objectName: "second" } Component.onCompleted: { for (var i = 0; i < screens.length; i++) console.log(screens[i].objectName) } } //outputs: // first // second
Note, that declaring empty list properties (i.e. with an explicitly given "[]" value) does not work too. Should that be vied as a separate bug?