I face the problem of a slow response with this code
Repeater3D {
model: <QAbstractListModel>
Model {
materials: [
DefaultMaterial {
id: pieceMaterial
diffuseColor: "green"
diffuseMap: Texture {
sourceItem: Rectangle { color: "red"; text: "A" }
}
It takes a couple of seconds on a fast computer to create ~5000 rather simple objects. Without the texture speed is okay; and I can set the object color via diffuseColor (in fact max 200 out of the 5000 objects get a texture, which is more or less only a label). But if the diffuseMap is assigned to a Texture the diffuseColor stops working even when the texture content is not visible.
It seems to be a task for a state but I cannot create/assign the whole texture like
State {
name: "noContent"
when: true
PropertyChanges {
target: pieceMaterial
diffuseMap: {}
}
Any idea?