Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Standard labels (like Quit/Exit)

Standard labels (like Quit/Exit)

Scheduled Pinned Locked Moved Solved General and Desktop
7 Posts 3 Posters 448 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Raureth
    wrote on last edited by
    #1

    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

    raven-worxR 1 Reply Last reply
    0
    • R Raureth

      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

      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      @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)

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      3
      • R Offline
        R Offline
        Raureth
        wrote on last edited by
        #3

        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 ?

        mrjjM 1 Reply Last reply
        0
        • R Raureth

          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 ?

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @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.html

          and ofc as @raven-worx via all the TS files.

          raven-worxR 1 Reply Last reply
          0
          • mrjjM mrjj

            @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.html

            and ofc as @raven-worx via all the TS files.

            raven-worxR Offline
            raven-worxR Offline
            raven-worx
            Moderators
            wrote on last edited by
            #5

            @mrjj
            QDialogButtonBox would request the text from the platform plugin, but there is no value for quit/exit.

            --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
            If you have a question please use the forum so others can benefit from the solution in the future

            mrjjM R 2 Replies Last reply
            1
            • raven-worxR raven-worx

              @mrjj
              QDialogButtonBox would request the text from the platform plugin, but there is no value for quit/exit.

              mrjjM Offline
              mrjjM Offline
              mrjj
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @raven-worx

              Ok. I see now poster asking more about the text and not so
              much application building so QDialogButtonBox is a red herring. thank you.

              1 Reply Last reply
              0
              • raven-worxR raven-worx

                @mrjj
                QDialogButtonBox would request the text from the platform plugin, but there is no value for quit/exit.

                R Offline
                R Offline
                Raureth
                wrote on last edited by
                #7

                @raven-worx
                Oh, sad it isn't there. Thank you very much.

                1 Reply Last reply
                0

                • Login

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved