ich möchte gerne in die Thematik Auto-Connect aus einem Designer-Dialog in den eigenen Code einsteigen und arbeite mich gerade durch die Doku. Allerdings bin ich schon bei einem sehr einfachen Prog auf Probleme gestossen. Hier der Code:
imagedialog.h:
Code: Alles auswählen
#include "ui_imagedialog.h"
class ImageDialog : public QDialog, private Ui::Dialog
{
Q_OBJECT
public:
ImageDialog(QWidget *parent = 0);
private slots:
void on_buttonMax_clicked();
};
Code: Alles auswählen
#include <QtGui>
#include "imagedialog.h"
ImageDialog::ImageDialog(QWidget *parent)
: QDialog(parent)
{
setupUi(this);
}
void ImageDialog::on_buttonMax_clicked()
{
// still to-do
}
Code: Alles auswählen
#include <QApplication>
#include "imagedialog.h"
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
ImageDialog *dialog = new ImageDialog;
dialog->show();
return app.exec();
}
Compiling: main.cpp
Compiling: imagedialog.cpp
Linking executable: C:\Temp\qttest\qttest.exe
.objs\imagedialog.o:imagedialog.cpp:(.text+0x17d): undefined reference to `vtable for ImageDialog'
.objs\imagedialog.o:imagedialog.cpp:(.text+0x189): undefined reference to `vtable for ImageDialog'
.objs\imagedialog.o:imagedialog.cpp:(.text+0x277): undefined reference to `vtable for ImageDialog'
.objs\imagedialog.o:imagedialog.cpp:(.text+0x283): undefined reference to `vtable for ImageDialog'
Process terminated with status 1 (0 minutes, 4 seconds)
Ich habe absolut keine Ahnung, wo das Problem liegt.
Wäre schön, wenn jemand helfen könnte.
Greetz,
Cpt