Can anyone please tell me what is the process will be executed when system is like following?
I am thinking of creating a software that will have two systems:
- Server code and Database
- Client code and GUI codes.
When someone click the login button on my login page. I create a connection and connectToHost(). It gets connected. Then I need to know how can I get the data from database located on server system so that I can show the data on profile page.
Let suppose I need to retrieve name , address and photo.
Really need help regarding it!!!
Since this is such a general question, you should better just work through the normal tutorials available, like the "fortune server example":http://doc-snapshot.qt-project.org/4.8/network-fortuneserver.html and the "fortune client example":http://doc-snapshot.qt-project.org/4.8/network-fortuneclient.html.
Reading the docs to "QAbstractSocket":http://doc-snapshot.qt-project.org/4.8/qabstractsocket.html will help, too.
Thanks for the reply. However, I am not able to understand how someone can retrieve data from database and present it to client.
Can you tell me a process and classes to use.
Through the Qt database classes, e.g. QSqlDatabase, QSqlQuery etc., with the "supported database backend":http://doc.qt.nokia.com/4.7-snapshot/sql-driver.html#supported-databases.
See the docs of those two classes to see how to use them.