01-24-2013 07:33 PM - edited 01-24-2013 07:34 PM
Hey.
I am new to QML. I have some Tab's that I want to share action arrays to. This is to decrease duplication.
TabbedPane {
id: myPane
property list<ActionItem> actionListProperty: [
ActionItem {
title: "123"
}
]
Tab {
Page {
Container
{
actions : actionListProperty
}
}
}
}Is something like this possible? I get an error in Momentics complaining about the < character in my list property, but I am following the directions given here : http://qt-project.org/doc/qt-4.7/qml-list.html
01-24-2013 07:41 PM - edited 01-24-2013 07:43 PM
Another failed attempt
Page {
id: myPage
property AbstractActionItem myList: [
ActionItem {
title: "123"
}
]
Tab {
Page {
actions : myPage.myList
}
}
}
01-24-2013 08:26 PM
Would it work as attachedObjects?
01-25-2013 11:08 AM
04-05-2013 11:49 PM
I would also like to know the answer to this question. I am trying to maintain a basic list/array in QML that I can add items to depending on user interactions but everything I try, e.g. Javascript array does to work for me.
04-06-2013 04:32 AM
04-06-2013 06:51 AM
rcebryk wrote:
With Javascript it can be done, but in qml it won't work. There is a bug in latest qt - you can create lists but you cannot change them. It is described somewhere in QT docs. That is probably why qml lists are not mentioned in cascades docs
And how can a list/array be done using javascript alone without QML? I would like to have the equivalent of an array property that can be modified, with things added via push() etc. Sorry if this is an obvious question but I am relatively new to QML and Javascript.
04-06-2013 06:58 AM
04-06-2013 08:16 AM
I ended up giving up trying to figure it out and dropped the feature I wanted to add using lists (out of frustration). I came to the (perhaps incorrect) conclusion that QML is only powerful enough for screen layouts. Seems like a wasted oportunity and using QML actually took longer than C++ because all the time I saved on typing was spent trying to find work arounds for missing features. I also found the inability to debug a problem for complex application development.