I haven't copied and pasted. I just hat this solution several times in different variations
compiler output is:
_main in main.cpp.o
"MainWindow::MainWindow(QWidget*)", referenced from:
_main in main.cpp.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
mainwindow.cpp
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QVTKWidget>
MainWindow
::MainWindow(QWidget *parent
) : ui(new Ui::MainWindow)
{
ui->setupUi(this);
QVTKWidget *central = new QVTKWidget();
setCentralWidget(central);
}
MainWindow::~MainWindow()
{
delete ui;
}
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QVTKWidget>
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
QVTKWidget *central = new QVTKWidget();
setCentralWidget(central);
}
MainWindow::~MainWindow()
{
delete ui;
}
To copy to clipboard, switch view to plain text mode
main.cpp like in the last posting
MainWindow * main = new MainWindow();
main->show();
MainWindow * main = new MainWindow();
main->show();
To copy to clipboard, switch view to plain text mode
Bookmarks