Search code examples
c++user-interfaceqtqt4messagebox

An "About" message box for a GUI with Qt


    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?


Solution

  • 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.