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



  • 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
    @


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Are you sure your qwt dll's can be found ?



  • I have the same question here: http://qt-project.org/forums/viewthread/46723/


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.