Results 1 to 2 of 2

Thread: Sending a image using QSocket & QServerSocket

  1. #1
    Join Date
    Feb 2006
    Posts
    5
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default Sending a image using QSocket & QServerSocket

    Hi everyone,

    I have created a Client-Server program using QT3. Client can connect with the server and server shoud be able to send screen shots to the client and client displays them in a lable.
    Problem is that the server sends the image, client captures it but it doesn't identify as a image. Number of bytes send from the server and bytes captured from the client is same...
    I tryed every thing but couldn't fix the problem. i've attach the to programs Client and Sever.
    Can anybody help me on this........
    Attached Files Attached Files

  2. #2
    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: Sending a image using QSocket & QServerSocket

    QDataStream uses its own format for data, so if you send an integer QSocket::bytesAvailable() should be greater than sizeof(int).

Similar Threads

  1. can Qlabel display a series of image one by one ?
    By jirach_gag in forum Qt Tools
    Replies: 3
    Last Post: 11th August 2008, 15:36
  2. Finding marks on scanned image for alignment
    By caduel in forum Qt Programming
    Replies: 1
    Last Post: 23rd September 2007, 02:10
  3. Very simple problem with QServerSocket and Qsocket
    By eter in forum Qt Programming
    Replies: 2
    Last Post: 4th November 2006, 08:07
  4. qt network performance
    By criss in forum Qt Programming
    Replies: 16
    Last Post: 24th July 2006, 09:23

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.