QSerialPort and thread on Ubuntu
I need a serial port for read camera, and other serial port for write control command.
Is it double thread?
Now I can read camera, but can't write command to serial port (com.setTarget).
And the error: QSocketNotifier: Can only be used with threads started with QThread.
Code: link text
mrdebug last edited by
Hi. You should use events to exchange data between qthreads.
Sorry, I don't understand.
I have to make a widgets project?
And use 'connect' to read camera and write command?
But I still need to open 2 serial port at the same time.
What is the difference with my problem?
O, I do it.
Only make a application project, and copy the code.
Unless you do some heavy stuff with your serial port, there's no need for threads, you can open several ports at the same time without any problem.