[Qt-interest] What to use as a base class for histogram classes?

Eric Clark eclark at ara.com
Mon Sep 21 20:54:41 CEST 2009


James,

I would take a look at QGraphicsScene and QGraphicsView. You might want to start by reading http://doc.trolltech.com/4.5/graphicsview.html if you have never used one before. You could do it with a QPainter, but the QGraphicsView was designed to do just what you are trying to do, and more...

Thanks,
Eric

From: qt-interest-bounces at trolltech.com [mailto:qt-interest-bounces at trolltech.com] On Behalf Of James Matta
Sent: Monday, September 21, 2009 1:47 PM
To: qt-interest at trolltech.com
Subject: [Qt-interest] What to use as a base class for histogram classes?

I am working on writing a data analysis tool for my research and I need to be able to display 1D and 2D histograms (see attachments for examples). Users need to be able to do things like click within the histogram and have the position recorded (so that they can give initial values for peak fits, identify channel number/ number of counts etc more finely than the scale might give, highlight regions of interest, etc.)

My first thought was to subclass out of QPainter or QPaintDevice or one of their subclasses; but, I am uncertain of whether or not this is the best choice, or even if it is a good choice. I would appreciate any advice that you might have on the subject.

Thanks in advance.

Cheers,
--
James Matta
University of Notre Dame
Physics Department
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090921/5be73fc0/attachment.html 


More information about the Qt-interest-old mailing list