当我尝试在qml2中使用ImageParticle构建粒子系统时,编译器会出现此错误:
Non-existent attached object
ImageParticle:{
^
以下是我的代码部分:
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
}
答案 0 :(得分:1)
为什么你没有冒号
ParticleSystem{
和
Rectangle{
但你在这里有吗?
ImageParticle:{
我认为这就是错误信息的含义。