Results 1 to 3 of 3

Thread: QTcpSocket + Windows

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2008
    Posts
    17
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    1
    Thanked 1 Time in 1 Post

    Default QTcpSocket + Windows

    Hi all!

    I'm new to socket programming on windows.
    I made a client application working on linux using qtcpsocket, and it workd perfectly.

    I compiled it on windows, but it doesn't connect. Acutally, it might not try to connect.
    So, nothing happen. What should I do? Where is the problem.
    I found nothing relevant on the internet.

    The connection:

    Qt Code:
    1. void sudoku::on_connectButton_clicked()
    2. {
    3. if( connected == false )
    4. {
    5. tcpSocket->abort();
    6. tcpSocket->connectToHost(host,port);
    7. ui.sendButton->setEnabled(true);
    8. ui.connectButton->setText(QString("Disconnect"));
    9. connected = true;
    10. }
    11. else
    12. {
    13. tcpSocket->abort();
    14. ui.sendButton->setEnabled(false);
    15. ui.connectButton->setText(QString("Connect"));
    16. connected = false;
    17. }
    18.  
    19. }
    To copy to clipboard, switch view to plain text mode 
    Last edited by jpn; 10th January 2009 at 16:46. Reason: missing [code] tags

Similar Threads

  1. Opening text file fails after autostartup on windows
    By yogourta in forum Qt Programming
    Replies: 2
    Last Post: 18th October 2008, 04:52
  2. Windows not appearing in XP.
    By beardybloke in forum Qt Programming
    Replies: 7
    Last Post: 24th October 2007, 18:32
  3. Strange QTcpSocket behavior (debugged with Ethereal)
    By mdecandia in forum Qt Programming
    Replies: 23
    Last Post: 28th May 2007, 21:44
  4. converting unix exe to windows binary
    By deekayt in forum General Programming
    Replies: 2
    Last Post: 17th September 2006, 02:00
  5. MDI windows without QWorkspace
    By Big Duck in forum Newbie
    Replies: 2
    Last Post: 16th June 2006, 18:15

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.