Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Real time QtCharts block the UI after few minutes
QtWS25 Last Chance

Real time QtCharts block the UI after few minutes

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
qtchartqwtstuckui designrealtime
1 Posts 1 Posters 409 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    r.brue
    wrote on 24 Jul 2019, 06:59 last edited by r.brue
    #1

    Hi,I am cross-programming a Qt application for an embedded device (iMX6 QUAD + 1GB RAM). I am trying to create a QApplication which uses QChart classes for generating real time charts. These charts must run and refresh for a maximum of 10 hours but I am facing the problem that after few minutes the UI is completely blocked.
    What I am doing is creating a QThread which sends signals with the new data to the QMainWindow which contains few QCharts that must be refreshed. The QCharts have a X dimension that when there is more data, the chart must scroll right.
    My appending function core is composed by the following:

    if(reachedMaximumRight){
        QPointF p(xIndex, dataY);
        m_series[sIndex]->remove(0); 
        m_series[sIndex]->append(p);
        m_axisX->setRange(xIndex-maxXElements, xIndex);
    }else{
        QPointF p(xIndex, dataY);
        m_series[sIndex]->append(p);
    }
    

    What am I doing wrong? It seems that the chart doesn't removes old points and the UI cannot handle such heavy chart but I am not sure.
    PS: I have found a library called QWT, could it suit better for my purposes?

    PPS: I have followed the basic dynamic chart example (here)

    1 Reply Last reply
    0

    1/1

    24 Jul 2019, 06:59

    • Login

    • Login or register to search.
    1 out of 1
    • First post
      1/1
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved