Re: QT 4.5 and Plotting data
You are asking for a library, but don't want to use Qwt because it is a library ?
Uwe
Re: QT 4.5 and Plotting data
More or less yes. I want something like QCustomPlot, but QT 4.5 compatible code.
Re: QT 4.5 and Plotting data
You can always copy the code of an open source library into your source tree ( taking care of the license !) instead of using it as library - there is nothing special about QCustomPlot beside that it propagates this way. So this is no criteria for a package ( the other way it is: when you need a library and there is none ).
I'm afraid you won't find something else than Qwt for Qt 4.5, but you can easily strip it down to a smaller size ( and copy the files to your project even if IMHO this doesn't makes much sense ). In qwt/src/src.pro you can see the list of files that are needed for the plot classes only - when building the library you can configure to build them only in qwtconfig.pri ). Additionally you can remove more files for the plot items you don't need ( f.e for curves only ).
As author of the Qwt package I don't want to compare packages, but I don't agree that things are much easier than this code:
Code:
#include <qapplication.h>
#include <qwt_plot.h>
#include <qwt_plot_curve.h>
#include <qwt_plot_grid.h>
#include <qwt_symbol.h>
#include <qwt_legend.h>
int main( int argc, char **argv )
{
plot.setTitle( "Plot Demo" );
plot.setCanvasBackground( Qt::white );
plot.
setAxisScale( QwtPlot::yLeft,
0.0,
10.0 );
grid->attach( &plot );
curve->setTitle( "Some Points" );
curve
->setPen
( QPen( Qt
::blue,
4 ) ),
curve
->setRenderHint
( QwtPlotItem::RenderAntialiased,
true );
curve->setSymbol( symbol );
curve->setSamples( points );
curve->attach( &plot );
plot.resize( 600, 400 );
plot.show();
return a.exec();
}
Uwe