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. QMessagebox buttons in local language

QMessagebox buttons in local language

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 4 Posters 2.2k 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.
  • Alexandre CameloA Offline
    Alexandre CameloA Offline
    Alexandre Camelo
    wrote on last edited by
    #1

    Hello friends!

    Is there any way to configure the buttons of a QMessagebox for the local language? Example: The "Yes" and "No" buttons contain these same words in Brazilian Portuguese.

    JonBJ 1 Reply Last reply
    0
    • Alexandre CameloA Alexandre Camelo

      Hello friends!

      Is there any way to configure the buttons of a QMessagebox for the local language? Example: The "Yes" and "No" buttons contain these same words in Brazilian Portuguese.

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      @Alexandre-Camelo
      https://stackoverflow.com/questions/31533019/how-to-translate-the-buttons-in-qmessagebox should show you how to do this correctly.

      1 Reply Last reply
      0
      • Christian EhrlicherC Offline
        Christian EhrlicherC Offline
        Christian Ehrlicher
        Lifetime Qt Champion
        wrote on last edited by
        #3

        You have to load the Qt translations, see e.g. here: https://wiki.qt.io/How_to_create_a_multi_language_application

        Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
        Visit the Qt Academy at https://academy.qt.io/catalog

        1 Reply Last reply
        3
        • A Offline
          A Offline
          avinash.r.p
          wrote on last edited by
          #4

          QMessageBox messageBox(QMessageBox::Question,
          tr("Sure want to quit?"),
          tr("Sure to quit?"),
          QMessageBox::Yes | QMessageBox::No,
          this);
          messageBox.setButtonText(QMessageBox::Yes, tr("Yes"));
          messageBox.setButtonText(QMessageBox::No, tr("No"));

          1 Reply Last reply
          1

          • Login

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