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. Help adding callouts to chart lines
Forum Updated to NodeBB v4.3 + New Features

Help adding callouts to chart lines

Scheduled Pinned Locked Moved Unsolved General and Desktop
qchartviewqchartmouseeventsqgraphicsview
1 Posts 1 Posters 412 Views 1 Watching
  • 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
    mmikeinsantarosa
    wrote on 9 Jul 2020, 19:25 last edited by
    #1

    I've already got a project that automatically builds charts after selecting a folder full of .csv data. Now I want to be able provide X/Y values to the user for the lines on the chart. I've checked out the callout & zoomlineclient examples that ship with Qt but I don't really understand how to tackle this problem.

    My existing code uses a (ui) QMainWindow that contains a (_chart) QChart class that gets rendered via a (_chartView) QChartView in a like so:

        //_chart has already had multiple series added
        // to it and properties set at this point
        chartView = new QChartView(_chart);
        ui->chartLayout->addWidget(chartView,0,0);
        ui->chartLayout->update();
    

    I've been able to subclass the QChartview so that I can pickup MouseEvents but I'm really confused translating that callouts example use of a completely different classes QGraphicsView & QGraphicsScene.

    Any advice in general as how to proceed would be much appreciated.

    1 Reply Last reply
    0

    1/1

    9 Jul 2020, 19:25

    • 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