T
T
TriKrista2014-12-09 12:33:11
Qt
TriKrista, 2014-12-09 12:33:11

Working with Qwt, why does the application crash?

I have an application using Qwt that terminates unexpectedly. Business happens under ArchLinux.
Here is an example code:

// plot.h
#include <QWidget>
#include <qwt/qwt_plot.h>

class Plot : public QWidget {
    Q_OBJECT
public:
    Plot(QWidget *parent = 0);;

private:
    QwtPlot *pPlot;
};

//plot.cpp
#include "plot.h"

Plot::Plot(QWidget *parent) : QWidget(parent) {
        pPlot = new QwtPlot(this);
}

//main
#include "widgetview.h"
#include <QApplication>
#include "plot.h"

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    Plot plot;

    return a.exec();
}

added the following lines to the .pro file:
INCLUDEPATH += /usr/include/qwt
LIBS += -lqwt

Here's what could be wrong?
With the Qt 4.x library, Qwt works fine. Probably in order for everything to work with Qt 5.x, you need to rebuild Qwt.
In general, the issue is closed.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
DancingOnWater, 2014-12-09
@DancingOnWater

If we fall before entering main, then this means that most likely so did not catch up at startup. I didn’t work in ArchLinux, so I don’t know what could interfere with it. everything worked like clockwork in Ghent.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question