Hi to all! Some time ago I downloaded Qwt. All OK. Compiling OK. Installing OK.
A troubles with using in project was resolved successfully. But I need a histogram.
Well, there is an example present in source code. Good. Building... OK.
Trying to start examples one by one.
bode - segmentation fault :confused:
cpuplot - symbol lookup error: ./cpuplot: undefined symbol: _ZNK9QwtLegend4findEPK20QwtLegendItemManager ????
curvedemo1, curvedemo1 - segmentation fault :confused: :mad:
data_plot - segmentation fault :-/
dials - ok :-D
event_filter - ok :-)
histogram - segmentation fault :-/
radio - ok :-D
realtime - segmentation fault :-/
simple - segmentation fault :-/
sliders - ok :-D
spectrogram - segmentation fault >:-/
sysinfo - ok :-)
So, it`s a pity, but I can`t see most interesting examples. Well. I`m trying to write a histogram for my project. Step by step I`m trying to understand what`s wrong with example "histogram". As I understood there are no class like QwtHistogram. So, in example I have
Code:
 { public: virtual ~HistogramItem(); virtual QwtDoubleRect boundingRect() const; virtual int rtti() const; void setBaseline(double reference); double baseline() const; enum HistogramAttribute { Auto = 0, Xfy = 1 }; void setHistogramAttribute(HistogramAttribute, bool on = true); bool testHistogramAttribute(HistogramAttribute) const; protected: private: void init(); class PrivateData; PrivateData *d_data; };
I wrote a test as copy of example:
and got segmentation fault in return a.exec();Code:
 #include <stdlib.h> #include <qapplication.h> #include <qpen.h> #include <qwt_plot.h> #include <qwt_plot_grid.h> #include <qwt_plot_marker.h> #include <qwt_interval_data.h> #include "histogram_item.h" int main(int argc, char **argv) { plot->setTitle("Histogram"); grid->enableXMin(true); grid->enableYMin(true); grid->attach(plot); HistogramItem *histogram = new HistogramItem(); histogram->setColor(Qt::darkCyan); const int numValues = 20; QwtArray<QwtDoubleInterval> intervals(numValues); QwtArray<double> values(numValues); double pos = 0.0; for ( int i = 0; i < (int)intervals.size(); i++ ) { const int width = 5 + rand() % 15; const int value = rand() % 100; values[i] = value; pos += width; } histogram->attach(plot); plot->replot(); #if QT_VERSION < 0x040000 a.setMainWidget(&plot); #endif plot->resize(600,400); plot->show(); return a.exec(); }
Can you help me? Were is problem may be? May be another way present to make histogram?
Thanks a lot everyone!

