Set timeout does not work

Hello, i have the following code execute to hide a group after 3000 ms.
In action editor: When a key or button is pressed --> project --> execute:

function () {
setTimeout(function(){ document.childByName(“Group 72”).scriptAdaptor.actionHide(); }, 3000);
}

But i think Flipabit does not support timeout function.

Any alternative?

setTimeout() of javascript doesn’t work in QML.

For Actions Editor:
image

Or for Code Editor:

import QtQuick 2.5

Item {
    Connections {
        target: document.childByName("Button 1").scriptAdaptor
        onEventItemClicked: {
            timer.start()
        }
    }
    Timer {
        id: timer
        interval: 3000
        onTriggered: document.childByName("Group 1").scriptAdaptor.actionHide()
    }
}

Wow. You always helpful.


Back to Flipabit >
Copyright © 2018. Flipabit Team. All rights reserved.