Important: Please read the Qt Code of Conduct -

Particles slow down when mouse is moving

  • I have the following QML code:

    import QtQuick 2.11
    import QtQuick.Controls 2.0
    import QtQuick.Particles 2.0
    ApplicationWindow {
        // ...
        id: window
        visible: true
        width: 1200
        height: 300
        title: qsTr("Hello World")
            id: root
            width: 480; height: 160
            color: "#1f1f1f"
                id: particleSystem
                id: emmiter
                anchors.centerIn: parent
                width: 160; height: 80
                system: particleSystem
                emitRate: 10
                lifeSpan: 6400
                lifeSpanVariation: 500
                size: 32
               velocity: TargetDirection{
                  targetX: 100
                   targetY: 0
                    targetVariation: 100/6
                    magnitude: 100
                source: "image.png"
                system: particleSystem
                rotation: 15
                rotationVelocity: 45

    The code runs as expected, but when my move is moving inside the window everything slows down(the movement speed, the rotation speed). Is this expected behaviour and if so how can i disable it?

  • Can anyone at least confirm that this issue persists in their device please?

  • Hi @imaqt-0

    I do not see the delay/slow down in animation that you are experiencing.

    I took your code... (used your imports and more recent import statements). Using your version or this more recent imports did not make a difference:
    import QtQuick 2.11
    import QtQuick.Controls 2.5
    import QtQuick.Particles 2.12

    I do not have your "image.png", I therefore added to the project qrc resource "earth.png" & "sun.png" that I found within the Qt samples. Maybe your PNG is different? Much larger?

    My laptop is recent (uses the built in Intel 620 graphics chip, I don't think it's anything special)
    A Logitech mouse with recent drivers, M310 mouse, etc...

    Have you seen this behavior on other hardware?
    Maybe it's your video card/software driver?
    Or mouse/software. I'd try your code on another device just to see if it's reproducible.


  • The image isn't important as its reproducible even without it and it's a general problem with any qml animation as far as i can tell. If it doesn't happen on your device it might be a problem with my amd apu.

  • @imaqt-0
    I forgot to mentioned that I tested your code on Win10 using the Desktop MSVC2017 64 bit
    (community edition of VC2017) as my tool set.
    What tools set are you using?

  • Win 10 as well, tried with msvc2017 32/64 and mingw 32/64.

Log in to reply