The following code is pseudo code (as it may contain syntax errors). It's just to give you an idea.
It also assumes you have a form 1 with a button on it.
{
Q_OBJECT
public:
private:
Form2 *mySecondForm;
};
Class Form1 : public QDialog
{
Q_OBJECT
public:
Form1(QWidget *parent = 0);
private:
Form2 *mySecondForm;
};
To copy to clipboard, switch view to plain text mode
Form1
::Form1(QWidget *parent
) : Dialog
(parent
){
// standard ui setup here...
mySecondForm = new Form2(this);
connect(ui->buttonShowForm2, SIGNAL(clicked()), mySecondForm, SLOT(show()));
}
Form1::Form1(QWidget *parent) : Dialog(parent)
{
// standard ui setup here...
mySecondForm = new Form2(this);
connect(ui->buttonShowForm2, SIGNAL(clicked()), mySecondForm, SLOT(show()));
}
To copy to clipboard, switch view to plain text mode
Try something like that.
Bookmarks