user2978100
user2978100

Reputation: 13

qml2 Non-existent attached object ImageParticle

When I try to build a particle system by using ImageParticle in qml2, the compiler gives this error:

Non-existent attached object 
         ImageParticle:{ 
        ^

Here is the part of my code:

import QtQuick 2.0
import QtQuick.Particles 2.0
Item {
id:particle
anchors.fill: parent
Rectangle{

anchors.fill: parent
ParticleSystem{
    id:petalParticleSystem
}
ImageParticle:{
        source:"image/Petal.png"
        system:petalParticleSystem
}

Upvotes: 0

Views: 2314

Answers (1)

Kakadu
Kakadu

Reputation: 2839

Why don't you have a colon in

ParticleSystem{

and

Rectangle{

but you do have one here?

ImageParticle:{

That's what the error message means, I think.

Upvotes: 1

Related Questions