How to create an about item showing version info in Help menu
Make it GREAT again last edited by
The title is what I am trying to do, see the atttachment as well![alt text]( image url).
I just wonder that is there a simple way to generate this item or we have to create a dialog class to show this version info.
BTW, I have alread created .rc file to give version info of the executable file and it works well.
You have to write it on your own.
JonB last edited by
As @Christian-Ehrlicher says, you have to write the code/dialog yourself. However, to keep it correct automatically over time, you can probably find some compilation-time variables to use instead of hard-coding what you are using right now. For example, in https://doc.qt.io/qt-5/qtglobal.html there is
qVersion(), and there are doubtless compiler macros for compiler version, etc.
Bonnie last edited by Bonnie
You don't have to create a new dialog class, you can just use QMessageBox.
But you need to write the contents (title, text/InformativeText, icon...) yourself.
You can take inspiration of QApplication::aboutQt.