【问题标题】:qml2 Non-existent attached object ImageParticleqml2 不存在的附加对象 ImageParticle
【发布时间】:2017-04-25 01:04:39
【问题描述】:

当我尝试在 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
}

【问题讨论】:

    标签: qt qml


    【解决方案1】:

    为什么没有冒号

    ParticleSystem{
    

    Rectangle{
    

    但是你这里有吗?

    ImageParticle:{
    

    我认为这就是错误消息的含义。

    【讨论】:

      猜你喜欢
      • 2016-11-11
      • 1970-01-01
      • 1970-01-01
      • 2019-02-18
      • 2021-11-09
      • 2013-02-22
      • 1970-01-01
      • 2016-09-12
      • 2010-10-11
      相关资源
      最近更新 更多