Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Create timer in component.oncompletion



  • Attempting to create a timer in Component.onCompleted using the following code but I keep getting an error about needing a ';'. Thanks for your help.

    Component.onCompleted: {
    		     Timer {
    		         interval: 1500; running: true; repeat: false;
    		         onTriggered: do_something;
    		     }
    }
    


  • @QtGuy said:

    Component.onCompleted: {

    Remove the ":"