Ich habe ein Problem mit dem Erstellen eines eigenen QwtPlots, aktuell enthällt die Klasse noch keine eigenen Methoden oder Objekte. Mein Plot soll aber später eine eigene Liste von Kurven enthalten.
Hier erst einmal mein Code:
tldplot.h
Code: Alles auswählen
#ifndef TLDPLOT_H
#define TLDPLOT_H
#include <qwt_plot.h>
#include "tldcurve.h"
class Tldplot : public QwtPlot
{
public:
explicit Tldplot(QWidget *parent = 0);
protected:
private:
};
#endif // TLDPLOT_H
Code: Alles auswählen
#include "tldplot.h"
Tldplot::Tldplot(QWidget *parent) : QwtPlot( parent )
{
}
dazu noch kurs mein Project File:13:12:25: Running steps for project tld_reader...
13:12:25: Configuration unchanged, skipping qmake step.
13:12:25: Starting: "/usr/bin/make"
g++ -Wl,-rpath,/home/sammy/Qt5.1.0/5.1.0/gcc_64 -Wl,-rpath,/home/sammy/Qt5.1.0/5.1.0/gcc_64/lib -o tld_reader main.o mainwindow.o seriesdialog.o tldplot.o tldcurve.o worker.o moc_mainwindow.o moc_seriesdialog.o moc_tldplot.o moc_tldcurve.o moc_worker.o -lqwt -L/home/sammy/Qt5.1.0//5.1.0/gcc_64/lib -lQt5Widgets -lQt5Gui -lQt5Core -lGL -lpthread
tldplot.o:(.data.rel.ro._ZTV7Tldplot[_ZTV7Tldplot]+0x1d8): undefined reference to `QwtPlot::legendItemClicked()'
tldplot.o:(.data.rel.ro._ZTV7Tldplot[_ZTV7Tldplot]+0x1e0): undefined reference to `QwtPlot::legendItemChecked(bool)'
tldplot.o:(.data.rel.ro._ZTV7Tldplot[_ZTV7Tldplot]+0x1e8): undefined reference to `QwtPlot::updateTabOrder()'
tldcurve.o:(.data.rel.ro._ZTV8Tldcurve[_ZTV8Tldcurve]+0x20): undefined reference to `QwtPlotCurve::updateLegend(QwtLegend*) const'
tldcurve.o:(.data.rel.ro._ZTV8Tldcurve[_ZTV8Tldcurve]+0x28): undefined reference to `QwtPlotItem::legendItem() const'
tldcurve.o:(.data.rel.ro._ZTV8Tldcurve[_ZTV8Tldcurve]+0x30): undefined reference to `QwtPlotCurve::drawLegendIdentifier(QPainter*, QRectF const&) const'
tldcurve.o:(.data.rel.ro._ZTV8Tldcurve[_ZTV8Tldcurve]+0x50): undefined reference to `QwtPlotAbstractSeriesItem::draw(QPainter*, QwtScaleMap const&, QwtScaleMap const&, QRectF const&) const'
collect2: error: ld returned 1 exit status
make: *** [tld_reader] Error 1
13:12:26: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project tld_reader (kit: Qt 5.1.0 (gcc_64))
When executing step 'Make'
Code: Alles auswählen
#-------------------------------------------------
#
# Project created by QtCreator 2014-03-05T10:01:47
#
#-------------------------------------------------
QT += core gui
CONFIG += qwt
INCLUDEPATH += \
/usr/include/qwt
LIBS += \
-lqwt
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = tld_reader
TEMPLATE = app
SOURCES += main.cpp\
mainwindow.cpp \
seriesdialog.cpp \
tldplot.cpp \
tldcurve.cpp \
worker.cpp
HEADERS += mainwindow.h \
seriesdialog.h \
tldplot.h \
tldcurve.h \
worker.h
FORMS += mainwindow.ui \
seriesdialog.ui
Vielen Dank für eure Hilfe!