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
cpuplot - symbol lookup error: ./cpuplot: undefined symbol: _ZNK9QwtLegend4findEPK20QwtLegendItemManager ????
curvedemo1, curvedemo1 - segmentation fault
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
Qt Code:
  1. class HistogramItem: public QwtPlotItem
  2. {
  3. public:
  4. explicit HistogramItem(const QString &title = QString::null);
  5. explicit HistogramItem(const QwtText &title);
  6. virtual ~HistogramItem();
  7.  
  8. void setData(const QwtIntervalData &data);
  9. const QwtIntervalData &data() const;
  10.  
  11. void setColor(const QColor &);
  12. QColor color() const;
  13.  
  14. virtual QwtDoubleRect boundingRect() const;
  15.  
  16. virtual int rtti() const;
  17.  
  18. virtual void draw(QPainter *, const QwtScaleMap &xMap,
  19. const QwtScaleMap &yMap, const QRect &) const;
  20.  
  21. void setBaseline(double reference);
  22. double baseline() const;
  23.  
  24. enum HistogramAttribute
  25. {
  26. Auto = 0,
  27. Xfy = 1
  28. };
  29.  
  30. void setHistogramAttribute(HistogramAttribute, bool on = true);
  31. bool testHistogramAttribute(HistogramAttribute) const;
  32.  
  33. protected:
  34. virtual void drawBar(QPainter *,
  35. Qt::Orientation o, const QRect &) const;
  36.  
  37. private:
  38. void init();
  39.  
  40. class PrivateData;
  41. PrivateData *d_data;
  42. };
To copy to clipboard, switch view to plain text mode 

I wrote a test as copy of example:
Qt Code:
  1. #include <stdlib.h>
  2. #include <qapplication.h>
  3. #include <qpen.h>
  4. #include <qwt_plot.h>
  5. #include <qwt_plot_grid.h>
  6. #include <qwt_plot_marker.h>
  7. #include <qwt_interval_data.h>
  8. #include "histogram_item.h"
  9.  
  10. int main(int argc, char **argv)
  11. {
  12. QApplication a(argc, argv);
  13.  
  14. QwtPlot* plot = new QwtPlot(0);
  15. plot->setCanvasBackground(QColor(Qt::white));
  16. plot->setTitle("Histogram");
  17.  
  18. QwtPlotGrid *grid = new QwtPlotGrid;
  19. grid->enableXMin(true);
  20. grid->enableYMin(true);
  21. grid->setMajPen(QPen(Qt::black, 0, Qt::DotLine));
  22. grid->setMinPen(QPen(Qt::gray, 0 , Qt::DotLine));
  23. grid->attach(plot);
  24.  
  25. HistogramItem *histogram = new HistogramItem();
  26. histogram->setColor(Qt::darkCyan);
  27.  
  28. const int numValues = 20;
  29.  
  30. QwtArray<QwtDoubleInterval> intervals(numValues);
  31. QwtArray<double> values(numValues);
  32.  
  33. double pos = 0.0;
  34. for ( int i = 0; i < (int)intervals.size(); i++ )
  35. {
  36. const int width = 5 + rand() % 15;
  37. const int value = rand() % 100;
  38.  
  39. intervals[i] = QwtDoubleInterval(pos, pos + double(width));
  40. values[i] = value;
  41.  
  42. pos += width;
  43. }
  44.  
  45. histogram->setData(QwtIntervalData(intervals, values));
  46. histogram->attach(plot);
  47.  
  48. plot->setAxisScale(QwtPlot::yLeft, 0.0, 100.0);
  49. plot->setAxisScale(QwtPlot::xBottom, 0.0, pos);
  50. plot->replot();
  51.  
  52. #if QT_VERSION < 0x040000
  53. a.setMainWidget(&plot);
  54. #endif
  55.  
  56. plot->resize(600,400);
  57. plot->show();
  58.  
  59. return a.exec();
  60. }
To copy to clipboard, switch view to plain text mode 
and got segmentation fault in return a.exec();

Can you help me? Were is problem may be? May be another way present to make histogram?
Thanks a lot everyone!