Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- QAction *action = new QAction(tr("show popup"), this);
- connect(action, &QAction::triggered, this, &MyWidget::showPopup);
- addAction(action);
- void MyWidget::showPopup()
- {
- QMessageBox* popup = new QMessageBox(this);
- popup->setModal(true);
- popup->setFocus();
- popup->show();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement