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,
_
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,
_
If you don't have any Qt UI then you don't need a widgets project.
But you need an instance of QCoreApplication (or on of its subclasses) and run its event loop (by calling its exec() function).
Just try to start with an empty main() function.
Then creating and configuring the QSerialPort instance.
Then maybe trying to write a fixed command.
When that works, add the original code instead of the test QSerialDevice code.
Cheers,
_
Try replacing QT += serialport with QT += core serialport in the pro file
Bookmarks