QMessageBox::about( this, "About Application",
"<h4>Application is a one-paragraph blurb</h4>\n\n"
"Copyright 1991-2003 Such-and-such. "
"For technical support, call 1234-56789 or see\n"
"<a href=\"http://www.such-and-such.com\">http://www.such-and-such.com</a>" );
This code is creating the About message box which I wanted to have with two exceptions:
1) I would like to change the icon in the message box with an aaa.png file
2) And I would like to have the link clickable. It looks like hyperlink (it is blue and underlined) but mouse click does not work
Any ideas?
I think you should create a custom QWidget
for your about widget. By this way, you can put on the widget all you want. By example, you can place QLabel
using the openExternalLinks
property for clickable link.
To display a custom image on the QWidget
, this example may help.
For the icon, you need to just set the application icon. Something like this:
QApplication::setWindowIcon(QIcon(":/aaa.png")); // from a resource file
As for making the links clickable, I don't think it can be done with the QMessageBox::about
API directly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With