Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- QFont f;
- QMessageBox *msgBox = new QMessageBox(this);
- QDesktopWidget *win = new QDesktopWidget();
- f.setPointSize(6);
- msgBox->setWindowModality(Qt::WindowModal);
- msgBox->setFont(f);
- msgBox->setButtonText(1, "Hola");
- msgBox->setText("Presionaste el boton!\n FORRO");
- msgBox->setWindowTitle("Msgbox en Qt");
- msgBox->show();
- msgBox->move(win->width() / 2 - msgBox->width() / 2, win->height() / 2 - msgBox->height() / 2);
- msgBox->exec();
Advertisement
Add Comment
Please, Sign In to add comment