Results 1 to 15 of 15

Thread: QtNetwork: Why don't I detect incomming connections ? (incomingConnection() is never

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #8
    Join Date
    Mar 2016
    Posts
    6
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QtNetwork: Why don't I detect incomming connections ? (incomingConnection() is ne

    Please pardon my late reply for I have not been at the desk during the holidays.

    Quote Originally Posted by anda_skoa View Post
    Hmm, maybe the client is connecting to something else?
    It's a wireless network where there is only 1 host & 1 client. The client is not able to connect if the host hasn't reached the line listen()

    Quote Originally Posted by jefftee View Post
    My advice? Learn to walk before you try to run.
    That's why I stick to the tutorial made directly by Qt, how does one learn the very lowest instance of a teaching unit if even this ain't running.

    Quote Originally Posted by jefftee View Post
    In your original post, you show a run() method for your thread that does not contain a message loop and will exit almost immediately after your thread is started. The default QThread::run() runs a message loop. If you write your thread to persist and continue to run, you should execute the base class QThread::run() in your subclassed run() method or just simply call exec() in your run() method.

    Without this, your thread will start and end almost instantaneously, which I'm sure is not what you intended.
    This might be true. However I don't even get to the point where this thread is created - which is my actual problem mentioned in the top post. As stated incomingConnection(), where this thread first is created, is never fired.
    Last edited by QtExchange; 30th March 2016 at 08:38.

Similar Threads

  1. QTcpServer - how to refuse incomming connection
    By atomic in forum Qt Programming
    Replies: 5
    Last Post: 19th August 2015, 13:31
  2. Replies: 1
    Last Post: 14th March 2014, 06:29
  3. Replies: 8
    Last Post: 11th September 2010, 10:41
  4. Replies: 1
    Last Post: 4th February 2009, 01:53
  5. Drag incomming localurl !=linux not work kde
    By patrik08 in forum Qt Programming
    Replies: 6
    Last Post: 11th December 2006, 15:23

Tags for this Thread

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.