Results 1 to 7 of 7

Thread: How to use QSerialPort for double thread

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #4
    Join Date
    Nov 2015
    Posts
    3
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default Re: How to use QSerialPort for double thread

    Quote Originally Posted by Vikram.Saralaya View Post
    The Qt documentation says:


    The serial port read in your case probably happens in a separate thread.. You need to make sure read and write happens in the same thread in which you open the port. Hope that helps..

    Regards
    Vikram
    But how to do it?
    I think that my program use only one thread.


    Added after 15 minutes:


    Quote Originally Posted by anda_skoa View Post
    My guess is that the problem is your missing Q(Core/Ui)Application instance.
    So the main thread is not "adopted" as a QThread and thus lacks the necessary event dispatcher for socketnotifier's event handling.

    Cheers,
    _
    Make a widgets project?
    Last edited by nistar; 18th November 2015 at 14:54.

Similar Threads

  1. QserialPort
    By arturs in forum Newbie
    Replies: 0
    Last Post: 13th May 2015, 20:37
  2. Qt5 cmake and QSerialPort
    By Chris.Burner in forum Newbie
    Replies: 1
    Last Post: 21st April 2013, 16:13
  3. Program not finding an existing double in a QList<double>
    By aarelovich in forum Qt Programming
    Replies: 2
    Last Post: 9th May 2011, 20:59
  4. Replies: 2
    Last Post: 24th June 2009, 15:38

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.