Hi
I will show you the error and my project files.
Error:
Starting D:\Documents\Qt\QwtExamples\0003_EmptyPlot_for_Qt5 \build-EmptyPlot_for_Qt5-Desktop_Qt_5_2_0_MinGW_32bit-Debug\debug\EmptyPlot_for_Qt5.exe...
QWidget: Must construct a QApplication before a QWidget
Invalid parameter passed to C runtime function.
Invalid parameter passed to C runtime function.
EmptyPlot_for_Qt5.pro
QWT_LOCATION = c:/Qwt-6.1.0
INCLUDEPATH += $${QWT_LOCATION}/include
LIBS = -L$${QWT_LOCATION}/lib \
-lqwt
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
SOURCES += \
main.cpp
QWT_LOCATION = c:/Qwt-6.1.0
INCLUDEPATH += $${QWT_LOCATION}/include
LIBS = -L$${QWT_LOCATION}/lib \
-lqwt
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
SOURCES += \
main.cpp
To copy to clipboard, switch view to plain text mode
main.cpp
#include <QApplication>
#include <qwt_plot.h>
int main(int argc, char **argv)
{
plot.show();
return app.exec();
}
#include <QApplication>
#include <qwt_plot.h>
int main(int argc, char **argv)
{
QApplication app(argc, argv);
QwtPlot plot;
plot.show();
return app.exec();
}
To copy to clipboard, switch view to plain text mode
Thank you!
Bookmarks