Hi all!
I am kind of new with qt and I am doing a more or less complex program (at least for me).
I have a client server application that send and receives QByteArray packages and it works but it is not optimize. My boss told me that it should use the tcp members in a separated QThread because if the query takes too long the Gui part of the client kind of block until the QTcpSocket.waitforreadyread() is finished.
I saw all the basic examples but I haven't seen any example with a QByteArray as parameter and that returns a QByteArray. I need to:
QByteArray qba; //this qbytearray is compose with stuff like username,password from the GUI
qba = MyThread(qba).start();
I know that the syntax is totally wrong and this doesn't work but how can I send and get a qba that is processed in a QThread...and is this the best solution?
Thank you all!
Bookmarks