AIM
I am writing a Qt GUI client that interacts with a database server via firewall friendly network traffic. In testing this I have created a trivial GUI project opening connections to Qt EchoServer. On button-click I can send a string to EchoServer. What I really want is to allow the user to enter an ID into a Line Edit box, then for my code to send this ID to the server which replies with a string. This string to then be placed into a Line Edit box (or Label) adjacent to the ID Line Edit. Then to move on to the next Line Edit box and so on. The proper application will be doing database lookups - but I am OK with that.

PROBLEM
I am stuck on how to handle the reply from the server and how to place it into the correct widget on my form.

MY ATTEMPTS
I have tried creating WebSocket in my MainWindow code module and then connecting QWebSocket::textMessageReceived to one of a number of handlers. I have also tried implementing my WebSocket as a thread and waiting for completion before fetching the reply from the WebSocket thread and stuffing the result into my form. Neither of these approaches seem elegant.

What is the way to do this please? Can anyone explain or provide a link to a web tutorial?

I am fairly new to Qt and returning to C++ after 10 years of other work (Embedded C, Java, etc)