I am working on a client-server project. On the client side, I have a few GUI windows containing different views (QTableView, QListView). I can send messages to the server just fine using the following method:
QByteArray bArray;
QDataStream out(&bArray, QIODevice::WriteOnly);
out.setVersion(QDataStream::Qt_4_7);
//....//
out << quint16(0) << message;
out.device()->seek(0)
out.quint16(bArray.size() - sizeof(quint16));
socket.write(block);
My problem however comes on my server side. My server will receive the message, go through a couple of steps reading the message to decide the necessary info to get from the SQL database, run the Query returning a Model(QSqlTableModel, QSqlQueryModel), but should then send the respective model back to the client.
Is there any way for me to send this model back to the server?