Janus:
What about when you wan to launch a new window?, hide the parent window, but keep track of it to recall it later. I have an intro window with buttons and one of these should launch the "main window" that I call the admin window:
void introWindow::adminstart() {
hide();
adminwin = new AdminWindow(this);
}
void introWindow::adminstart() {
hide();
adminwin = new AdminWindow(this);
}
To copy to clipboard, switch view to plain text mode
my header file has the following:
#ifndef INTROWINDOW_H
#define INTROWINDOW_H
#include <QWidget>
#include <QtGui>
#include <QPushButton>
#include <QtGui/QGraphicsView>
#include <QtGui/QPushButton>
#include <QtGui/QVBoxLayout>
#include <QtGui/QHBoxLayout>
//#include "adminWindow.h"
class AdminWindow;
{
Q_OBJECT
public:
//introWindow();
~introWindow();
private slots:
void adminstart();
private:
AdminWindow *adminwin;
};
#endif
#ifndef INTROWINDOW_H
#define INTROWINDOW_H
#include <QWidget>
#include <QtGui>
#include <QPushButton>
#include <QtGui/QGraphicsView>
#include <QtGui/QPushButton>
#include <QtGui/QVBoxLayout>
#include <QtGui/QHBoxLayout>
//#include "adminWindow.h"
class QAction;
class QMenu;
class AdminWindow;
class introWindow : public QWidget
{
Q_OBJECT
public:
introWindow(QWidget *parent = 0);
//introWindow();
~introWindow();
QGraphicsView *graphicsView;
QPushButton *adminButton;
QPushButton *measureButton;
QPushButton *viewButton;
QPushButton *quitButton;
QVBoxLayout *vboxLayout;
QHBoxLayout *hboxLayout;
private slots:
void adminstart();
private:
AdminWindow *adminwin;
};
#endif
To copy to clipboard, switch view to plain text mode
when I compile I get the following error msg:
Undefined symbols:
"AdminWindow::AdminWindow(QWidget*)", referenced from:
introWindow::adminstart() in introwindow.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
Bookmarks