Hi Felgo,
I need to extend ArrayDelegate
in ItemEditor
.
The truth is, I already kind of figured it out quite well, thanks to Squaby demo and some debugging, but some bits are still not 100% clear for me.
1.
Could you provide full body of ArrayDelegate.qml
, ArrayContentDelegate.qml
and ArrayElementDelegate.qml
?
I only found some distributed with Felgo but it includes only body with public interface(properties and methods).
Getting what is possible and how things work from debugging, without source, was really time consuming.
Would be great if there was a better way to get more info than debugging different apps code.
2.
ArrayElementDelegate.qml provided with Felgo has just some properties and methods:
Rectangle {
property int waveIndex
property int spacing
property variant propMetaData
property variant currentModelData
property variant writeModel
property variant model
property bool defaultValueIsSet
property variant repeater
function changedValue(id,value) {
}
I understand few of the properties but could you add some more info?
For example, what is the purpose and behavior of writeModel
?
Also, I don’t know which parameters are really required, I guess spacing
is not mandatory?
I think waveIndex
is here by accident from the time when Squaby demo extended this template 🙂
3.
ArrayContentDelegate.qml body is:
import Felgo 3.0
import QtQuick 2.2
import QtQuick.Controls 1.1
Item {
property variant repeater
property variant propMetaData
property Component elementDelegateComponent
}
Any more info on any of the properties would be great.
Repeater
is kind of clear and propMetaData
.
What about elementDelegateComponent
, how is it used? In Squaby this value is not overridden, for example.
4.
Any extra behaviors would be awesome to explain a little.
For example, how to add new object to array(model data), just change the model values? Is this the correct way?
What about saving model, I guess item editor does it at the end based on model data?