Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. QwtPlot keeps crashing my program - "The program has unexpectedly finished."
Forum Updated to NodeBB v4.3 + New Features

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

Scheduled Pinned Locked Moved Installation and Deployment
3 Posts 3 Posters 2.6k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    krimster
    wrote on last edited by
    #1

    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
    @

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

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

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • 8Observer88 Offline
        8Observer88 Offline
        8Observer8
        wrote on last edited by
        #3

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

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved