1 Attachment(s)
How to add a a Button to a QMessageBox?
I am making a program.. And i had add an about button which shows a QMessageBox..
Code:
void MainWindow::on_aboutButton_clicked()
{
msgBox.setText("<b><big>Putsa pali! </big><b>");
msgBox.setInformativeText("By <b>putsos</b> and <b>muni</b>. If you like it, visit our <a href=http://www.qjdfkjfbhjebfebfiofu.com>webpage</a>!");
msgBox.setWindowTitle("Putsa pali | About");
msgBox.
setIconPixmap(QIcon(":/icons/putsa.png").
pixmap(QSize(64,
64)));
msgBox.
setWindowIcon(QIcon(":/icons/putsa.png"));
msgBox.exec();
}
So how can i add a Button ( i want to add a Button "How it was Developed") left to the ok button which will close the about QMessageBox and show the How it was developed QMessageBox... ?
Re: How to add a a Button to a QMessageBox?
Maybe you should try to derive a new class from QMessageBox.
Re: How to add a a Button to a QMessageBox?
Re: How to add a a Button to a QMessageBox?
Re: How to add a a Button to a QMessageBox?
Quote:
Originally Posted by
Bong.Da.City
Ok and how to do that?
I haven't actually done that,I suggest you checking the document of qt,check for the class structure of QMessageBox,and find out by which function it adds buttons,and you may overload the function.
But I recommend you to derive a class from QWidget,I think qt don't recommend using QMessageBox as a base class.
cheer up and try that;)
Re: How to add a a Button to a QMessageBox?
Never mind.. I will just create some QDialogs :)...