QT networking help please.
-
I have searched and read and cannot get my head around networking.
Using QtCreator 9.0.1All I want is an entry box for an ip address, a connect button and a button that
send a command to the remote end and parses any responses.I have looked and looked and cant find anything that makes it clear and simple.
I'm finding this frustrating.I can post my code if anyone can help.
Regards
John -
All I want is a spaceship and means to get around the galaxy without much hassle :)
Using QtCreator 9.0.1
Your IDE doesn't usually matter. More important is your OS, Qt version and technology used (QML, C++, Python etc).
entry box
See QLineEdit
for an ip address
See QLineEdit::setValidator and an example of regular expression that filters IPs.
connect button and a button that send a command
See QPushButton and QObject::connect for an example how to run code on button click
send a command to the remote
See QNetworkAccessManager for an example how to send a request and receive response that you can parse.
I'm finding this frustrating
A couple deep breaths, taking a walk or exercising a little sometimes helps.
I can post my code if anyone can help
We're here to help. A minimal example of what specifically gives you trouble would be best. Don't post entire project.
-
@John-Telek said in QT networking help please.:
All I want is an entry box for an ip address, a connect button and a button that
send a command to the remote end and parses any responses.Is that ALL you want? LOL
Lets see. First you need to study the gui widgets and understand how they work together, then you need to understand the types of IP connections and what their capabilities are, and then choose the correct type for your application, then you need to learn how to program for the selected type of network transport, then you need to have an actual "compatible program" on the destination end, and you'll need ot understand how to parse the answer you receive from the server, based on the type of IP connection to use, and lets not forget adding intelligence to handle possible errors.
And that's "all you want"...hmmm