Results 1 to 4 of 4

Thread: QSocket: connecting but not connected

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QSocket: connecting but not connected

    Quote Originally Posted by olberg
    Does the client program at present does not use slots, does it have to. In the current version I simply loop with 1 second sleeps and wait for the state to change to "Connected".
    Unfortunately, in Qt3 you must use signals & slots mechanism for QSocket. This means also that you can't wait in a loop for it to connect.
    Last edited by jacek; 8th May 2006 at 10:41. Reason: fixed a typo

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QSocket: connecting but not connected

    You could use QSocketNotifier here (I think -- I never used it myself).

  3. #3
    Join Date
    Feb 2006
    Location
    Kungsbacka, Sweden
    Posts
    4
    Qt products
    Qt3
    Platforms
    Unix/X11

    Thumbs up Re: QSocket: connecting but not connected

    Thanks, my little program works now, using slots. I have been using QSocketNotifier before and I am convinced that would work, too. I wanted something quick and dirty here, that's why I hadn't used slots right away in this example.

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.