刚刚开始学习qwt,编译了几行代码 发现程序中使用qwt的类 编译成功后生成的exe打不开 请教是什么原因
int main(int argc, char **argv)
{
QApplication a(argc, argv);
QwtPlot plot;
plot.setAxisScale(QwtPlot::xBottom, 0.0, 10.0);
plot.setAxisScale(QwtPlot::yLeft, -1.0, 1.0);
QwtPlotCurve *curve = new QwtPlotCurve("y = sin(x)");
curve->setData(SinusData());
curve->attach(&plot);
plot.show();
return a.exec();
}
又程序中只要有qwt的类 应用程序就无法打开 如下。将QwtSlider行注释就可以打开
QLabel *label = new QLabel(tr("label"), this);
QPushButton *btn = new QPushButton(tr("click"), this);
QwtSlider *slider = new QwtSlider( this, Qt::Horizontal, QwtSlider::TopScale, QwtSlider::BgTrough);
QVBoxLayout *layout = new QVBoxLayout;
layout->addWidget(label);
layout->addWidget(btn);
setLayout(layout);