About Qt from QML
-
Are there any way of fetching the text-content from QMessageBox::aboutQt() w/o actually opening the dialog? I would like to add an "About Qt" menu entry in a QML-based app but don't want to open the dialog. I've looked at the code and it does look promising. Everything is "hard-coded" in QMessageBox.
I know that it's possible to get the runt time version by calling qVersion() but I would prefer the whole shebang.
-
The only hack I can think of, is that you might be able to extract it somehow from the translation files. Reading out the values before showing isn't going to work, I think, as the aboutQt method immediately shows the dialog itself. If there were a non-static version, you could have used this approach, but as it stands, I don't think you can (without flicker, anyway).
-
I'm afraid that you're right. I also thought of using the translations file but that is to "dangerous", it can and will break :)
Maybe I'll raise a ticket for this...
-
I don't think a ticket will stand much of a chance, to be honest. What purpose does it serve, really? If you really need that text, you can copy it from the Qt sources.
-
Well, the text is actually "created" at run-time which means it can be changed depending on what version of Qt your application is currently running on. Links, icons etc might change between versions. I just think it's nice to have an about for Qt too, but that's me :)
If I do a QML app I don't want to popup a widget based dialog.