Quantcast
Channel: Qt DevNet forums: Installation and Deployment
Viewing all articles
Browse latest Browse all 2113

QwtPlot keeps crashing my program -"The program has unexpectedly finished."

$
0
0
And, I have no idea why, nor how to fix it. ( I’m actually pretty sure this is a really newbie problem too…) This was originally happing in another tutorial I was working on, and I eventually traced it back to the line:  QwtPlot *plot = new QwtPlot(); Just to make sure, I create a new project to see if I could figure out what it was (not)doing (no luck) Everything builds, I’m working in QtCreator v 5.3, using MinGW, and on a windows OS. main.cpp #include "tutorial.h" #include <QApplication> #include <qwt_plot.h>   int main(int argc, char *argv[]) {     QApplication a(argc, argv);     QwtPlot *plotc = new QwtPlot();     return a.exec();     //    QApplication a(argc, argv); //    Tutorial w; //    w.show();   //    return a.exec(); } .pro file QT       += core gui   greaterThan(QT_MAJOR_VERSION, 4): QT += widgets   TARGET = tutorial TEMPLATE = app     SOURCES += main.cpp\         tutorial.cpp   HEADERS  += tutorial.h   CONFIG += qwt # #-the graphic library : INCLUDEPATH += C:/Qt/qwt-6.1.0/src LIBS += C:\Qt\qwt-6.1.0\lib\libqwt.a tutorial.cpp and tutorial.h I haven’t touched  //tutorial.cpp   #include "tutorial.h"   Tutorial::Tutorial(QWidget *parent)     : QWidget(parent) { }   Tutorial::~Tutorial() {   }  //tutorial.h #ifndef TUTORIAL_H #define TUTORIAL_H   #include <QWidget>   class Tutorial : public QWidget {     Q_OBJECT   public:     Tutorial(QWidget *parent = 0);     ~Tutorial(); };   #endif // TUTORIAL_H

Viewing all articles
Browse latest Browse all 2113