Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
5.5.1, 5.6.2, 5.9.0
-
Qt 5.5.1, MSVC 2013 64-bit, Windows 10 64-bit
Qt 5.5.1, GCC 4.9, Android 6.0
Qt 5.6.2, MinGW 4.9.2 32-bit, Windows 10 64-bit
Description
Documentation does not mention dynamic creation of Emitter objects so I assume this behavior is a bug.
Here is example code that reproduces the problem - pressing anywhere will cause an Emitter to be created. In my environment several first clicks cause flickering (about 20) and then there is no flickering at all.
import QtQuick 2.5 import QtQuick.Window 2.2 import QtQuick.Particles 2.0 Window { visible: true width: 640 height: 480 Rectangle { id: particle width: 30 height: width radius: width / 2 color: "white" visible: false Component.onCompleted: { particle.grabToImage(function(result) { particleImage.source = result.url; }) } } Rectangle { anchors.fill: parent color: "black" ParticleSystem { id: particleSystem anchors.fill: parent ImageParticle { id: particleImage width: 30; height: 30 } } } MultiPointTouchArea { anchors.fill: parent onPressed: { for (var i = 0 ; i < touchPoints.length ; i++) emitterComponent.incubateObject( particleSystem, { x: touchPoints[i].x, y: touchPoints[i].y }) } } Component { id: emitterComponent Emitter { emitRate: 10 velocity: PointDirection {x: 0; y: 0; xVariation: 200; yVariation: 200;} size: 30 Timer { running: true interval: 1000 onTriggered: { parent.destroy() } } } } }