finally... thanx to this : http://www.qtforum.org/article/28674...ainwindow.html
mainwindow.h
class mainWindow : public ..., private Ui..
{
private slots:
void openNewMainWindow();
}
class mainWindow : public ..., private Ui..
{
private slots:
void openNewMainWindow();
}
To copy to clipboard, switch view to plain text mode
mainwindow.cpp
#include "newmainwindow.h"
newMainWindow *newWin = 0;
{
setupUi(this);
connect(buttonObjectName, SIGNAL(clicked()), this, SLOT(openNewMainWindow()));
}
void mainwindow::openNewMainWindow()
{
newWin = new newMainWindow();
newWin->show();
}
#include "newmainwindow.h"
newMainWindow *newWin = 0;
mainWindow::mainWindow() : QMainWindow()
{
setupUi(this);
connect(buttonObjectName, SIGNAL(clicked()), this, SLOT(openNewMainWindow()));
}
void mainwindow::openNewMainWindow()
{
newWin = new newMainWindow();
newWin->show();
}
To copy to clipboard, switch view to plain text mode
newmainwindow.h & newmainwindow.cpp are just common mainwindow apps...
Bookmarks