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

How to update data from model to qml dynamically .



  • This post is deleted!


  • hey @sush123
    You are missing the signal to notify the QML

    void TimerModel::updateTime(int timeLeft, int timeFull , int status)
    {
      if(status == 1)
      {
        m_timeLeft = timeLeft;
        m_timeFull = timeFull;
        // notify the changes
        emit isTimeLeftValueChanged();
        emit isTimeFullValueChanged();
      }
    }
    

    hint: always try to use code blocks when you write your code for better readability.


Log in to reply