PDA

View Full Version : creating a login for my chat application



asma11
8th September 2014, 23:21
hello !
I want to add a login window that appears when a client want to open the chat application ,it contains 2 field one for username and an other for password
so the user can connect if he allready has an account otherwise he create it . I want to know how can i do this ? and how to save the list of users and accounts ? can I use SQLITE ?
Please help me ! :confused:
Thanks :)

wysota
9th September 2014, 07:57
The question is so general that I don't know what kind of answer you expect. Yes, you can store your login data in sqlite database if you don't need to access it from another machine. You can also store login data in QSettings object. However both these approaches operate on local data so there is no way of checking if the user already has an account or not without contacting the chat system infrastructure. Thus a more plausible approach seems to be to use whatever your chat system uses for communication.

asma11
10th September 2014, 13:24
what can I use to check if the user already has an account or to access to the list of users in the database from any machine. I use the client/server architecture and Tcp protocol.

aamer4yu
11th September 2014, 07:01
Just think how any Messenger programs works,,, gather what is required for such an application.
You would probably need server, database, global IP,,, and rest your logic to search / identify user.