C++ Discussion Forums

There's no such thing as a stupid question. Ask. Discuss. Learn.

QextSerialPort: Use the value read on serial port

Hello everyone,

I am a beginner in C++ with Qt Creator and I have started using the QextSerialPort library to read sensor data sent on the COM port. I can get the values on the console using the PortListener class and I would like to be able to use them to do operations on them or display them on an interface. I just don't know how to make the class return a variable in my hand that matches the values displayed in debug.

I guess I have to create a function that takes a variable and the name of the port as arguments and returns the variable that contains the data? But well I don't know how to do it, I hope my question is not too vague, all the tracks or advice are welcome. Do not hesitate if you need more information.

PortListener class look like:


And the main like:


Quentin Plisson 6 months ago
  • Whitelisted Links