Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. [solved] something like oncreate: running code at the startup of an application
Forum Updated to NodeBB v4.3 + New Features

[solved] something like oncreate: running code at the startup of an application

Scheduled Pinned Locked Moved Mobile and Embedded
4 Posts 2 Posters 2.6k 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,

    howto run C++ code at the start ?

    Thank you.

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

    1 Reply Last reply
    0
    • T Offline
      T Offline
      task_struct
      wrote on last edited by
      #2

      Hello,

      just put it in your main() function.

      "Most good programmers do programming not because they expect to get paid or get adulation by the public, but because it is fun to program."

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

        This works fine.

        Does it makes sense to use a reference to mainWindow.setup1() (my funcion is called setup1) which is declared in the header (void setup1();) and defined in the mainwindow.cpp instead of directly writing it into the main.cpp?

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

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

          worked fine now, solved.

          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