Unsolved How to create an about item showing version info in Help menu
-
Hello,
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.
-
@Make-it-GREAT-again
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 isQT_VERSION_STR
orqVersion()
, and there are doubtless compiler macros for compiler version, etc. -
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. -
Hi,
You can take inspiration of QApplication::aboutQt.