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

  • Hello,

    howto run C++ code at the start ?

    Thank you.

  • Hello,

    just put it in your main() function.

  • 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?

  • worked fine now, solved.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.