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

Help adding callouts to chart lines

Scheduled Pinned Locked Moved Unsolved General and Desktop
qchartviewqchartmouseeventsqgraphicsview
1 Posts 1 Posters 402 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.
  • mmikeinsantarosaM Offline
    mmikeinsantarosaM Offline
    mmikeinsantarosa
    wrote on 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

    • Login

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