Results 1 to 5 of 5

Thread: send & recuve via socket

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanked 268 Times in 268 Posts
    Wiki edits
    20

    Default Re: send & recuve via socket

    Quote Originally Posted by nima View Post
    I wrote it in main.cpp.

    what is te meaning of moc at "main.moc"
    It's the meta object compiler. It makes it possible to use Qt signals and slots, among other things.

    is my way correct for connecting to the serve?
    Your slot connection is not correct.
    The slot is not part of the app.

    You also need to create an object based on Qconnect.

    Might I suggest your first learn c++?

  2. #2
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    6
    Thanked 348 Times in 333 Posts

    Default Re: send & recuve via socket

    tbscope speaks the truth: Please learn how to write a basic Qt application before trying to do socket programming - if you structure your program correctly and actually create an instance of the class that contains your slot, you would have a much better chance of your code doing what you want.

    (This should really be in the newbie forum, too)

Similar Threads

  1. qt TCP socket
    By ketan in forum Qt Programming
    Replies: 3
    Last Post: 20th November 2009, 11:17
  2. bug in Qt socket
    By dognzhe in forum Qt Programming
    Replies: 7
    Last Post: 12th June 2009, 07:36
  3. Replies: 7
    Last Post: 29th May 2009, 08:58
  4. TCP Socket with Qt4.2
    By Walsi in forum Newbie
    Replies: 3
    Last Post: 20th September 2007, 05:35
  5. bad UDP socket :(
    By chaosgeorge in forum Qt Programming
    Replies: 1
    Last Post: 11th December 2006, 02:55

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.