I create a QDialog and insert a QPushButton, which when clicked calls a QMainWindows, but QMainWindows only flashes on the screen, and will not appear.
here is the simple code:
login.h
private slots:
void Pushbutton_ok_click();
login.cpp
connect(ui->pushButton_OK,SIGNAL(clicked()),this,SLOT(Pushbutton_ok_click()));
void Login::Pushbutton_ok_click()
{
MainWindow W;
W.show();
}
login.h
private slots:
void Pushbutton_ok_click();
login.cpp
connect(ui->pushButton_OK,SIGNAL(clicked()),this,SLOT(Pushbutton_ok_click()));
void Login::Pushbutton_ok_click()
{
MainWindow W;
W.show();
}
To copy to clipboard, switch view to plain text mode
Bookmarks