PDA

View Full Version : new user



sattu
16th September 2010, 15:09
hi!!!!!!! i'm completely new to Qt programming. Previously i learnt only c++, nothing else. I know hardly some basics of Qt, but now i have to write a Qt programme on server client communication using serial port(RS-232), (i.e on the server part a database should exist and client should be able to access that database),,,, i even have very less idea on this ports, i.p.addresses and their basics. When my condition is this i have been directly asked to write such a prog. So, can someone help me, please?????? I'm totally confused,,,,,,, someone help,,,,,,,,,,,

daemonna
16th September 2010, 15:18
first look at networking examples... later ask specific questions what you dont understand..

sattu
16th September 2010, 15:41
thank you for replying,,,,,,,,,,,,i will try for it,,,,,,,,,,actually this thing is completely new to me,,,,,,,,,,,i have read that fortune client and server example,,,,,but i'm unable to understand what is happening where,,,,,,,,,which syntaxes are doing what??????? that's my exact problem- fully confused,,,,,,,,,,,:(

so if you can help in some regarding this,,,,,,,,,that would really be a great relief for me,,,,,,,,,,, waiting for help-------------------------

Lykurg
16th September 2010, 15:55
What do you expect? Do you have any specific question? On a general "how does it work" we can hardly answer since then we had to explain how networks normally work...

sattu
16th September 2010, 16:11
yaa,,,,,,,,,,,,you are right. It's actually "how does it work" question ,,,,,,,actually,,the assignment that has been given to me needs to be done now. Had i got some more time i would have taken some time to understand the basic Qt programming and functions of various classes. But though i'm new i still have been assigned directly this work. That is my problem. Is there any way that you could help me or guide me???????

wysota
16th September 2010, 16:17
I think the problem is not that you don't understand Qt network programming but rather that you don't understand network programming in general. Maybe you should first read a bit about networking in general (ask your favourite web search engine about it) and only then focus on programming.

sattu
16th September 2010, 16:32
maybe,,,,,,,,,but since Qt is new to me i'm confused with those various classes, different syntaxes. Any way thanks for replying, i know the problem that i'm facing is obvious for any new comer to Qt, the only problem is shortage of time,,,,,,,i would appreciate if you would help me regarding this,,,,,,,,,,

wysota
16th September 2010, 17:22
maybe,,,,,,,,,but since Qt is new to me i'm confused with those various classes, different syntaxes.
As I said, your problem is not lack of Qt skills. This is not a place to teach you about networking.


the only problem is shortage of time
So who gave you this assignment, when was it given to you and what is your deadline?

,,,,,,,,,,
Please stop using commas like that, it's very rude.

daemonna
16th September 2010, 20:13
you have to read

http://beej.us/guide/bgnet/output/html/multipage/index.html

and then you're ready to go ;)

sattu
17th September 2010, 06:27
oh! I'm extremely sorry for using those commas. Regarding the assignment, it was given to me 2 days back. actually now i'm in a R&D company and here every thing is going so fast, though i don't know the deadline, still i feel they may ask me at any time to show my progress as they have already asked me once. So, i'm confused as to how to write the server-client programme without having a minimum grip on Qt programming. well i'm trying for it, let me see, where i land up.

extremely thanks thanks for the link. I think that s surely going to help me. Let me start with it. Thanx once again.

tbscope
17th September 2010, 06:42
though i don't know the deadline, still i feel they may ask me at any time to show my progress as they have already asked me once.

Ask for it. If they don't want to give one, you give them one.
If they don't want to organise meetings, you do it.
In other words, do not get stressed out because incompetent people can't organise the work and put all the responsibility on you. You take control.

As for the server-client programming:
1. Keep it easy. Do NOT start with threading, you will not need it.
2. Use the examples that come with Qt as a starting point
3. Client-server communication can be very basic (depending on the needs of course). The server manages all the client connections. The server and the client exchange messages. This can all be done in plain text (not if you need to send binary data).

Once you get started with the examples (and try to understand them), the rest will not be that difficult.

sattu
17th September 2010, 06:48
thanks tbscope. Can you suggest me exactly which examples to start with and if possible some useful links related to it. Remember i'm at very basic level of Qt leave alone server client programming. That would be of great help to me.:)

tbscope
17th September 2010, 06:53
Yes,

http://doc.qt.nokia.com/4.6/network-fortuneserver.html
http://doc.qt.nokia.com/4.6/network-fortuneclient.html

I will answer specific questions if you have them, but not general questions. This means, a question like:

"I do not understand what nextPendingConnection() does, can you explain it?"
Will only get answered with a link to the documentation. Questions like this are already answered in the documentation.

"I tried to create a server that handles multiple clients but I got stuck. I already tried ... and it does not work."
That is a question that is more specific and shows that you already did try it yourself. Such a question I'm happy to answer.

sattu
17th September 2010, 07:14
o.kie,:), i will see to it. But if i get stuck off any where then do help me. Actually i have read that example and have also runned it checking for the fortunes being sent from server to client. But i will read it once again.