Details
-
Bug
-
Resolution: Unresolved
-
P1: Critical
-
None
-
6.8.3
-
None
Description
Hello,
I'm currently migrating my app from Qt 6.5.3 to 6.8.3 and found out that recent fix of QTBUG-117923 broke my particle animations.
I sometimes disable user interactions using "enabled: false" on the root item, for example to animate something on the screen. This causes ItemParticle to inherit this disabled state and to no longer work.
This was previously working. I suppose the new condition that the parent should be enabled is not a good one, as it mixes user interactions with a state of the particle system (i.e. what we actually want to check), and that we should simply check that the particle system or maybe the emitter is running instead in QQuickItemParticle::clockShouldUpdate()? Somehow, Emitter seems not to suffer from this issue from its "enabled" property that doesn't seem to inherit from anything, probably because it declares a custom "enabled" Q_PROPERTY in its class definition.
As a side-note, it also generates the following warnings when closing the app, if this couldn't show particles due to "enabled: false":
QQmlComponent: Cannot create a component in an invalid context
I couldn't find any workaround for this issue.
I also happened to not see any particle when my root object moves from enabled false to true, like if the ItemParticle state is not connected to those changes. For this, the workaround is to link the "running" property of the Particle system to the enabled state of the parent, for example:
Item { id: overlay ParticleSystem { id: particleSystem running: overlay.visible && overlay.enabled } ... }
Feel free to ask for more details,
Thank you,
Louis