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. [SOLVED] Run code at the start without the need of clicking somewhere
Qt 6.11 is out! See what's new in the release blog

[SOLVED] Run code at the start without the need of clicking somewhere

Scheduled Pinned Locked Moved QML and Qt Quick
3 Posts 2 Posters 4.5k 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.
  • P Offline
    P Offline
    pascal95abc
    wrote on last edited by
    #1

    Hello,

    is there a way to run code in QML at the start.
    Something like "onCreate" ?

    Thanks

    Qt 4.7.3
    Symbian OS v9.4 / Symbian^1, S60 5th Edition
    on N97

    1 Reply Last reply
    0
    • P Offline
      P Offline
      pizarro84
      wrote on last edited by
      #2

      Hi, I believe this is what you are looking for:

      @Component.onCompleted: {
      //code here
      }@

      1 Reply Last reply
      0
      • P Offline
        P Offline
        pascal95abc
        wrote on last edited by
        #3

        Yeah, it's exactly what I needed.
        Thank you!

        Qt 4.7.3
        Symbian OS v9.4 / Symbian^1, S60 5th Edition
        on N97

        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