Qt app passing arguments to send in sockets
-
I'm wondering would it be possible to integrate a separately written c++ client socket script to a qt gui that I've created with for example, pushbuttons and when clicked an argument assigned with that pushbutton would be sent via the sockets over to the server side?
So, when the app starts the client will establish a connection with the server and wait for data to be sent. When a button is clicked, the "data" associated with it will be sent over the sockets or when the app is closed the sockets will close. As I'm quite new to Qt, if possible I hope someone could provide some suggestions on how to go about it and examples would really help.
-
Hi and welcome do devnet,
Sure you can, Qt doesn't forbid you to use other libraries.
-
I was planning to put my entire client code in the main qt file so that when the program executes, the sockets would be established. But I'm not very sure how to go about passing the arguments from the pushbuttons to the client script.
-
Then I would recommend that you first go through the examples and tutorials from Qt's documentation to understand how things works then add your socket code.