Thanks for the quick replys.
I thought it must be something else, because qwt would be some kind of useless.
here is the whole code of a new app. which should work (but doesn't)
int main(int argc, char *argv[])
{
w.show();
return a.exec();
}
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
qwtplot w;
w.show();
return a.exec();
}
To copy to clipboard, switch view to plain text mode
{
plot->setTitle( "Plot Demo" );
plot->setCanvasBackground( Qt::white );
plot
->setAxisScale
( QwtPlot::yLeft,
0.0,
10.0 );
ui->hlayout->addWidget(plot); // the app crashes here.
[...]
plot->show();
ui->setupUi(this);
}
qwtplot::qwtplot(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::qwtplot)
{
QwtPlot* plot = new QwtPlot();
plot->setTitle( "Plot Demo" );
plot->setCanvasBackground( Qt::white );
plot->setAxisScale( QwtPlot::yLeft, 0.0, 10.0 );
plot->insertLegend( new QwtLegend() );
ui->hlayout->addWidget(plot); // the app crashes here.
[...]
plot->show();
ui->setupUi(this);
}
To copy to clipboard, switch view to plain text mode
Could this mean that my qwt is not compiled right? or do i something wrong with linking?
I use Qt 5.2.1 with MSVC addin 5.2.1 with qwt 6.1.2.
I can run plots and they work as expected.
Bookmarks