Results 1 to 2 of 2

Thread: Visual Studio add-in, generates QString::fromUtf8(...) instead of tr("")

  1. #1
    Join Date
    May 2011
    Posts
    11
    Thanks
    1
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Maemo/MeeGo

    Question Visual Studio add-in, generates QString::fromUtf8(...) instead of tr("")

    Hi all,

    I'm using the QT add-in for visual studio (VS2010) and, when it generates the header and source file from the .ui file it places all the strings as QString::fromUtf8(...) instead of the tr(..) which is needed for i18n.

    any idea how to change it?

    Thanks,
    G

  2. #2
    Join Date
    May 2011
    Posts
    11
    Thanks
    1
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Maemo/MeeGo

    Default Re: Visual Studio add-in, generates QString::fromUtf8(...) instead of tr("") : solved

    sorry, my mistake, I don't really understand the logic behind this but the generated class has a translation loading function in the end called:
    Qt Code:
    1. void retranslateUi(QMainWindow *mainWindow)
    To copy to clipboard, switch view to plain text mode 
    and it doesn't use tr() function at all.

Similar Threads

  1. Replies: 1
    Last Post: 10th March 2011, 14:40
  2. Replies: 9
    Last Post: 13th October 2010, 14:09
  3. Need definedInHeader("QString") == "q<somewhere>.h"
    By muenalan in forum Qt Programming
    Replies: 6
    Last Post: 29th September 2009, 11:04
  4. Qmake DLLDESTDIR, Visual Studio "clean solution"
    By SiLiZiUMM in forum Installation and Deployment
    Replies: 4
    Last Post: 18th March 2008, 12:14
  5. Translation QFileDialog standart buttons ("Open"/"Save"/"Cancel")
    By victor.yacovlev in forum Qt Programming
    Replies: 4
    Last Post: 24th January 2008, 19:05

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.