Dimitry,
You are right. Let’s start by the model.
My model is made of devices which can have list of devices (recursive model).
I want to list A’s so I do something like:
ListView {
model: model.devices
delegate: Device {
parameters: modelData.parameters
devices: modelData.devices
}
// Device.qml
Rectangle {
id: root
property alias parameters: parameters.model
property alias devices: devices.model
ListView {
id: parameters
}
Device {
id: devices
}
}
Qml output: Device is istantiated recursively
Regards,
Nuno
> On 15 Jan 2015, at 10:00, Dmitry Volosnykh <[email protected]> wrote:
>
> Nuno, it is sometimes hard to get an idea of what exactly you are trying to
> do without any minimal sample code provided.
>
> On Thu, Jan 15, 2015 at 12:57 PM, Nuno Santos <[email protected]
> <mailto:[email protected]>> wrote:
> Hi,
>
> I’m building a QML UI interface for a model that can have a recursive
> behaviour
>
> I’m trying to instantiate a custom module inside a custom module and it is
> saying XYZ is instantiated recursively.
>
> Why does this error doesn’t occur when you instantiate a Rectangle inside a
> Rectangle? Isn’t that the same?
>
> If I really want the same module to appear to model that by it’s own is
> recursive, what should I do? I cannot have a different Qml file for each
> recursive depth as I don’t know what will be the total depth of it. And it
> simply doesn’t make sense…
>
> Any ideas?
>
> Thanks,
>
> Nuno Santos
> _______________________________________________
> Interest mailing list
> [email protected] <mailto:[email protected]>
> http://lists.qt-project.org/mailman/listinfo/interest
> <http://lists.qt-project.org/mailman/listinfo/interest>
>
_______________________________________________
Interest mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/interest