Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.

Lupdate with qml files

From Wiki
Jump to: navigation, search
Article Metadata
Created: krix (20 Jun 2011)
Last edited: hamishwillee (13 Jun 2012)

To run the lupdate tool on .qml files right from the Qt-Creator, .qml files need to be added to the .pro file under the SOURCES section. Adding .qml to this section is however unwanted for the non-cpp files. Therefore, the following trick should be used:

(by the courtesy of @snowpong) simply create a conditional which never kicks in, list your QML files in SOURCES +=

   evil_hack_to_fool_lupdate {
   SOURCES += \
   qml/Splash.qml \
   qml/Login.qml \

Now you can use the script from Tools > External > Linguist > Update translations (lupdate) and files for languages marked in the TRANSLATIONS section of the .pro file will be generated

This page was last modified on 13 June 2012, at 10:55.
76 page views in the last 30 days.