Do you need something like this?
#include <QtGui>
int main (int argc, char** argv) {
window1->show();
QObject::connect(button,
SIGNAL(clicked
()), window2,
SLOT(show
()));
return ap.exec();
}
#include <QtGui>
int main (int argc, char** argv) {
QApplication ap(argc, argv);
QWidget *window1 = new QWidget(0);
QWidget *window2 = new QWidget(0);
QPushButton *button = new QPushButton("Open second Window", window1);
window1->show();
QObject::connect(button, SIGNAL(clicked()), window2, SLOT(show()));
return ap.exec();
}
To copy to clipboard, switch view to plain text mode
Bookmarks