How to call secondary window from MainWindow class function
Unsolved
General and Desktop
-
void MainWindow::on_pushButton_clicked()
{
QuickPaste quickpaste;
quickpaste.show();
}code above would only work If I call a.exec for QApplication a(argc, argv) right after quickpaste.show();
how do you guys manage this?
I could imagine:
pass QApplication a as an argument
make it global
use some C++ class features -
void MainWindow::on_pushButton_clicked() { QuickPaste* quickpaste=new QuickPaste(); quickPaste->setAttribute(Qt::WA_DeleteOnClose); quickpaste->show(); }