[Qt-qml] Executable code in a model?
Pertti Kellomäki
pertti.kellomaki at nokia.com
Tue Nov 16 14:13:08 CET 2010
On 11/16/2010 03:00 PM, ext Gregory Schlomoff wrote:
> Easy, just bind your javascript code to a signal or a property.
>
> QML version of your pseudo-code :
>
> Menu {
> MenuItem {
> title: "save"
> onActivated: {
> var file = ....
> file.save();
> }
> }
>
Thanks, I was hoping it would be this easy. Presumably I can then access
the onActivated handler in the delegate via the view's currentItem property?
--
Pertti
More information about the Qt-qml
mailing list