JesseTG
JesseTG

Reputation: 2123

Difference between QML's Component and Instantiator?

The QML types Component and Instantiator appear to do similar things; create QML objects on demand, as opposed to when parsing their definitions. So what's the difference? Why would I want to use one over the other?

Upvotes: 5

Views: 3189

Answers (1)

Florian Schmidt
Florian Schmidt

Reputation: 379

An Instantiator creates instances of the given Component - one for each model-entry given in model. It's similar to the Repeater.

A Component is a Class. A Instantiator is sort of a Factory for the given Component.

Upvotes: 5

Related Questions