Results 1 to 2 of 2

Thread: Application Hangs in QTcpConnection

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Aug 2008
    Posts
    134
    Thanks
    10
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Application Hangs in QTcpConnection

    Dear All,
    My application communicate with a external device (ex: camera) using QTcpSocket through LAN. whenever i request for a image with proper resolution, the device fetches new image and send the raw data to my application. i send/recieve the data continuousely, i.e whenever i receive n-th image from device/camera, i will send n+1 th request. This works fine when i am requesting for small resolution image. But if i am requesting for high resolution images, then images send and recieve happens correct. but my application will hang. i.e my appliaction doesnt allow for user events. Can anyone tell how can I resolve this???

    Thank you

  2. #2
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Application Hangs in QTcpConnection

    You must be reading the data in loop on ready read.
    Simplest way would be to call qApp->processEvents() in between your reading loop.

Similar Threads

  1. QSkinWindows Classes
    By kernel_panic in forum Qt-based Software
    Replies: 45
    Last Post: 20th April 2010, 12:35
  2. Qt Application + Web Integration -- Help needed
    By swamyonline in forum Qt Programming
    Replies: 0
    Last Post: 17th February 2009, 11:59
  3. Start Qt application as Windows Service
    By ^NyAw^ in forum Qt Programming
    Replies: 12
    Last Post: 10th May 2008, 17:23
  4. dll + application
    By fpujol in forum Qt Programming
    Replies: 11
    Last Post: 15th April 2007, 18:37

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.