What's the standard way to implement an "About" application dialog in Qt? You know, the kind that pops up when you go Help > About... from the application menu. I'm using Qt Designer to layout my main window, but I don't need anything fancy. It would be nice to do it in 2 lines of code instead of creating a new class or a new form in Qt Designer...
Qt provides a set of ready-made dialogs for file, font, color-selection and more. QColorDialog. Dialog widget for specifying colors. QFileDialog. Dialog that allow users to select files or directories.
Widgets are the primary elements for creating user interfaces in Qt. Widgets can display data and status information, receive user input, and provide a container for other widgets that should be grouped together. A widget that is not embedded in a parent widget is called a window.
You can use QMessageBox::about for simple about dialogs, or write your own QDialog subclass if you need anything more special/fancy.
About *about;
about = new About(this);
If you put 0
instead of this
, it will not be a "modal" window, so add this
in parentheses.about->show();
in that slot.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