Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Real Time Graph stops to replot while I click the main window



  • Hi everybody,
    I have a very simple main window with a graph, a start button, and a stop button. The start button sends, via serial port, a command to a USB device connected; then the USB device connected starts to send back some data that I want to plot inside the graph. The real-time plot is performed inside
    QObject::connect(&serial, &QSerialPort::readyRead, [&]
    {
    ...
    }
    So, when some data arrives at the serial port, the signal readyRead is managed to collect the data and plot them. Everything works fine unless I click the main window; in that case, for all the time in which I keep pressing the mouse, the serial data are stored in the USB buffer but not handled. When I release the mouse, the replot resumes, without the data stored inside the USB buffer during the click. It seems like the readyRead signal is not handled if I click the main window. How can I solve this problem?
    Thanks in advance,
    Daniele


  • Qt Champions 2020

    @Daniele90 , move QSP to thread.


Log in to reply