Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Draw a large scrollable plot
QtWS25 Last Chance

Draw a large scrollable plot

Scheduled Pinned Locked Moved Unsolved General and Desktop
scrollingplot
2 Posts 2 Posters 1.1k 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.
  • D Offline
    D Offline
    dridk2
    wrote on 2 May 2017, 20:23 last edited by dridk2 5 Feb 2017, 20:26
    #1

    I m trying to implement a horizontal scrollable plot. You can see a preview on the following gif .
    I would like some advice to improve performance .

    All plot data are loaded into memory. it's not so huge. So that's not the problem.
    Actually, I m drawing the graph inside a huge QPixmap which is displayed into a QScrollArea .
    When I rescale the graph, I have to redraw the pixmap, which can takes some time when I set the pen size higher.
    So, the best way would be to draw only what I see . How to manage scrolling with that ? Do you have any pattern or suggestion ?
    Using QtCharts, I didn't success to manage the scrolling...

    My code is here if you want to help
    https://github.com/labsquare/CutePeaks/blob/painter/PeaksWidget.cpp

    alt text

    1 Reply Last reply
    0
    • E Offline
      E Offline
      Eligijus
      wrote on 3 May 2017, 05:53 last edited by
      #2

      I suggest looking into QCustomPlot.

      1 Reply Last reply
      0

      2/2

      3 May 2017, 05:53

      • Login

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