Important: Please read the Qt Code of Conduct -

Execution of function at runtime (background)

  • Hi,

    I'm creating an app with a couple of buttons on the form, I have a slot that is used to execute a socket client, I was wondering is there a way to connect the slot to the mainwindow form so that it runs at run time in the background? I am also planning to send signals from the buttons as arguments to socket and send them as data to the server in the background. I've had a look at QThread, but I'm not sure if it is able to do this. I'm thinking the easiest way would be signal/slot, but not really sure what would be the correct method for this approach. I hope someone can provide some guidance on this matter.

Log in to reply