Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 270
JesseTG Avatar asked Oct 19 '22 04:10

JesseTG


1 Answers

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.

like image 59
Florian Schmidt Avatar answered Oct 21 '22 06:10

Florian Schmidt