Standard labels (like Quit/Exit)
-
Hello,
I was looking for the best wording for a "Quit" or "Exit" button/menu item.
On that page they say it is platform specific. https://ux.stackexchange.com/a/50903
Do there exist standard labels that we can use in QT and which have also their standard translation ? A bit like the StandardKeys in QT (quitting an app is catched with the shortcut of the OS (ALT+F4 on windows, the macOS standard shortcut on that system...) ,
Thank you
-
@Raureth
the "translation" dir of your qt installation contains translations which can be loaded with QTranslator.
I am pretty sure that the translation you are looking for is in there. I dont know in which file exactly though.
You could open the corresponding .ts file in QtLinguist and check (from the Qt sources) -
Thank you for your answer. My question was mainly about the existence of such standard label, to avoid having to write some code like:
if platforms is windows, write "Exit"
if platforms is macOS, write "Quit"
if platforms is whatever, write "the correct word for that platform"Just like the "QKeySequence::Quit", it could be something like "QStandardLabel::Quit"
I didn't find any such thing. Does it exist ?
-
@Raureth
Hi
Well there is no function to ask what is the name for Quit on platform X
but its via using Qt standard items like
https://doc.qt.io/qt-5/qdialogbuttonbox.htmland ofc as @raven-worx via all the TS files.
-
@mrjj
QDialogButtonBox would request the text from the platform plugin, but there is no value for quit/exit. -
Ok. I see now poster asking more about the text and not so
much application building so QDialogButtonBox is a red herring. thank you. -
@raven-worx
Oh, sad it isn't there. Thank you very much.