Results 1 to 4 of 4

Thread: Translate QPrintDialog

  1. #1
    Join Date
    Jul 2007
    Location
    Jundiai/SP, Brazil
    Posts
    114
    Thanks
    5
    Thanked 7 Times in 6 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Translate QPrintDialog

    Hi All,

    Is possible translate the text written inside buttons, Checkbox etc... inside the QPrintDialog.
    It is possivel send me a simple example?

    Thanks in advance.

  2. #2
    Join Date
    Feb 2009
    Posts
    29
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Translate QPrintDialog

    i think u can use findChild()

    following code will add a new item to the combo box in the dialog. Like this u can access the button also.

    Qt Code:
    1. QPrintDialog printDlg( PrinterName, this );
    2. pComboBox = printDlg.findChild<QComboBox *>();
    3. if( 0 != pComboBox )
    4. {
    5. QString NewItem = "NewItem";
    6. pComboBox->addItem( NewItem );
    7. }
    To copy to clipboard, switch view to plain text mode 
    Last edited by wysota; 12th May 2009 at 19:55. Reason: missing [code] tags

  3. #3
    Join Date
    Jul 2007
    Location
    Jundiai/SP, Brazil
    Posts
    114
    Thanks
    5
    Thanked 7 Times in 6 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Translate QPrintDialog

    Hi febil,

    Thanks for you help, I'll use your example to do what I need.

    Thanks

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Translate QPrintDialog

    If you install a proper translator object with a message catalogue containing translations for the dialog, it should be used automatically. The default message catalogue for Qt proabably already contains those messages so it's enough to translate them for your language or install an already existing translation set in case there is one for your language.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. translate on fly
    By Noxxik in forum Qt Programming
    Replies: 5
    Last Post: 26th February 2009, 14:21
  2. QTransform scaling and translate feature.
    By AmolShinde_8 in forum Qt Programming
    Replies: 1
    Last Post: 18th October 2008, 10:31
  3. Translate the SimpleChat example into PyQt
    By GuS in forum Qt Programming
    Replies: 1
    Last Post: 16th November 2007, 20:16
  4. How to use QPrinter without QPrintDialog?
    By pascal456 in forum Qt Programming
    Replies: 2
    Last Post: 15th November 2006, 19:57
  5. QPrintDialog problem
    By gesslar in forum Qt Programming
    Replies: 1
    Last Post: 16th February 2006, 04:27

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.