Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Create timer in component.oncompletion
Forum Updated to NodeBB v4.3 + New Features

Create timer in component.oncompletion

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
componentoncompletiontimer
2 Posts 2 Posters 990 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Q Offline
    Q Offline
    QtGuy
    wrote on last edited by
    #1

    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;
    		     }
    }
    
    1 Reply Last reply
    0
    • CharbyC Offline
      CharbyC Offline
      Charby
      wrote on last edited by
      #2

      @QtGuy said:

      Component.onCompleted: {

      Remove the ":"

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved