Results 1 to 2 of 2

Thread: Comunication between threads

  1. #1
    Join Date
    Sep 2016
    Posts
    8
    Qt products
    Qt5
    Platforms
    Windows Android
    Thanks
    3

    Default Comunication between threads

    I have a question and not an easy one for me, let me see if i can explain it well...

    In my main page i create a thread and it's porpouse is to open a TCP connection with a server who's going to send to him (the client) some messages every few secs.
    Meantime the main thread is going to make the application run.
    So the user can open Dialog1, then Dialog2, then Dialog3 and finally Dialog4.

    Dialog4 wants to know if the thread i started at the beginning (the TCP connection one) is receiving some particular messages.
    The problem i'm facing is: How can i connect those events?
    Thanks for your time and, i hope, answers and hints

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts

    Default Re: Comunication between threads

    Not sure why you need a separate thread for the TCP connection but if some messages are important elsewhere you need to store the fact that these have been received somewhere accessible from both locations.

    Cheers,
    _

Similar Threads

  1. QT and USB Modbus comunication
    By hruodbert in forum Qt Programming
    Replies: 5
    Last Post: 27th August 2011, 07:48
  2. Qt Threads vs Native Threads performance
    By StackOverflow in forum Qt Programming
    Replies: 1
    Last Post: 14th November 2010, 12:14
  3. Problem with comunication between widgets
    By laabor in forum Newbie
    Replies: 8
    Last Post: 8th May 2010, 13:07
  4. Threads...
    By Abc in forum Qt Programming
    Replies: 1
    Last Post: 19th June 2008, 17:35
  5. GUI thread and Working thread comunication
    By FasTTo in forum Qt Programming
    Replies: 2
    Last Post: 13th September 2007, 15:31

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.