Results 1 to 2 of 2

Thread: Send data over TCP

  1. #1
    Join Date
    Feb 2014
    Posts
    7

    Default Send data over TCP

    Hi guys,

    i used the tutorial from this page:
    http://www.bogotobogo.com/Qt/Qt5_QTc...ent_Server.php

    now i wanted to send data from the gui to the thread by using signals and slots (click on pushButton)

    unfortunatly i am getting an error:
    Socket notifiers cannot be enabled or disabled from another thread

    the socket was defined and started inside of the thread. Can i leave the socket definition inside of the thread ?

    Regards

  2. #2
    Join Date
    Dec 2009
    Location
    New Orleans, Louisiana
    Posts
    791
    Thanks
    13
    Thanked 153 Times in 150 Posts
    Qt products
    Qt5
    Platforms
    MacOS X

    Default Re: Send data over TCP

    Unless you have very specific needs, you do not need a separate thread. The Qt socket classes are asynchronous and will not block your main thread, etc.
    I write the best type of code possible, code that I want to write, not code that someone tells me to write!

Similar Threads

  1. Is it possible to send RAW data to a printer?
    By N3wb in forum Qt Programming
    Replies: 1
    Last Post: 1st October 2012, 02:28
  2. Cannot send data with QTcpSocket
    By stef13013 in forum Qt Programming
    Replies: 6
    Last Post: 1st September 2012, 12:00
  3. how to use qtcpsocket send qimage data
    By tsuibin in forum Qt Programming
    Replies: 2
    Last Post: 18th April 2012, 14:51
  4. how to send data using QTcpSocket and QTcpServer
    By gauravg in forum Qt Programming
    Replies: 1
    Last Post: 31st March 2012, 12:29
  5. My client can't send data
    By hiuao in forum Qt Programming
    Replies: 10
    Last Post: 23rd February 2007, 09:32

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.