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. Is it possible to change the language of the QColorDialog? [solved]

Is it possible to change the language of the QColorDialog? [solved]

Scheduled Pinned Locked Moved General and Desktop
qcolordialogqlocalelanguage
5 Posts 2 Posters 3.5k 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.
  • M Offline
    M Offline
    mameo
    wrote on 10 Jun 2015, 07:56 last edited by mameo
    #1

    I want to change the language of QColorDialog.

    Window title, was able to be changed in SetWindowTitle function.

    "Basic Colors" label, "Pick Screen Color" button, "Custom colors" label, "Add to Custom Colors" button, I want to change these languages.

    Could you tell me the way?

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 10 Jun 2015, 18:36 last edited by
      #2

      Hi,

      Do you mean through internationalization ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mameo
        wrote on 16 Jun 2015, 00:53 last edited by
        #3

        Thanks you!
        As a result of trial in a document that had you tell me , we were able to safely run .

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 16 Jun 2015, 21:19 last edited by
          #4

          You're welcome !

          Since you have it working now, please update the thread title prepending [solved] so other forum users may know a solution has been found :)

          You should also up-vote the answer(s) that helped you so other users may more easily find them

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • M Offline
            M Offline
            mameo
            wrote on 19 Jun 2015, 11:23 last edited by
            #5

            Such as ColorDialog, how to switch the language of the dialog that are available in the Qt is as follows .
            Page that was in reference

            #include <QApplication>
            #include <QTranslator>
            #include <QLibraryInfo>
            
            int main(int argc, char *argv[])
            {
                 //1 : Get the language setting of the system
                 QTranslator qtTranslator;
                 qtTranslator.load("qt_" + QLocale::system().name(),
                         QLibraryInfo::location(QLibraryInfo::TranslationsPath));
            
                 QApplication a(argc, argv);
            
                 //2 : Installation of language setting
                 a.installTranslator(&qtTranslator);
            
                 return a.exec();
            }
            
            1 Reply Last reply
            0

            4/5

            16 Jun 2015, 21:19

            • Login

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