Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. QML Not Refreshing (Using QChart.js from Julien Wintz)
QtWS25 Last Chance

QML Not Refreshing (Using QChart.js from Julien Wintz)

Scheduled Pinned Locked Moved QML and Qt Quick
qquickwidgetqmlqchart.jsqchartrepaint
1 Posts 1 Posters 1.3k 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.
  • M Offline
    M Offline
    maximo
    wrote on last edited by
    #1

    In this thread...

    http://forum.qt.io/topic/59627/disappearing-qquickwidget-image-needs-constant-repainting

    ...I was referred to ask the question here. I have some QML that connects with Julien Wintz's QChart.js project on Github. My QML looks like so:

    import QtQuick 2.0
    
    import "."
    import "QChart.js"        as Charts
    import "QChartGallery.js" as ChartsData
    
    Chart {
      id: chart_line;
      width: 300;
      height: 300;
      chartAnimated: false;
      chartData: ChartsData.ChartLineData;
      chartType: Charts.ChartType.LINE;
    }
    

    Trouble is -- I have this on a tab (QTabWidget) and at runtime when I click another tab and then come back, my chart data is gone. However, if I use some very simple QML to draw a rectangle (not using QChart.js), the problem doesn't occur.

    For now, I'm intercepting the QQuickWidget's paint event and doing another setSource() call on it to get around the problem. However, is there a better way?

    1 Reply Last reply
    0

    • Login

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