PDA

View Full Version : QGraphicsView/Scene/Item Questions



SixDegrees
25th August 2010, 23:41
We'll be starting a new project shortly using Qt to display anywhere from one to perhaps a few thousand data points on a graph. Mostly we'll be displaying one or two points at a time, but occasionally we'll want to show the entire collection of data all at once - it's a time series, and the most common view will be locations at a particular instant, but we may sometimes want to view the entire series at once.

My first thought is to use QGraphicsView. I've rejected Qwt and QwtPolar because it doesn't seem to be easy to address individual data points with the mouse, and annotation of individual points is another requirement. My questions are:

1) Is performance going to be a problem? I've used QGraphicsView in the past, but never with more than a small handful of QGraphicsItems. I haven't run into any problems, but some posters have related problems when there are a lot of them. Also, to simulate motion over time, I'll be progressively adding and removing consecutive items, rather than moving an individual item.

2) We'd like to annotate data points by clicking on them and displaying a popup with a list of states the user can select from; we may add free-form user annotation (text form) at a later date. It looks like I can grab mouse events through individual QGraphicsItems; will I be able to invoke a popup within the QGraphicsScene/View using this mechanism?