Working with lupdate

  • To have my translations all being found by lupdate, I have this in my project file:

    lupdate_only {
      SOURCES += *.qml
      SOURCES += folder1/*.qml
      SOURCES += folder2/*.qml
    1. it is kind of unpractical, that I have to list all folders manual. Can I somehow "automatic" add all qml files in sub-directories? Like:
    SOURCE += **/*.qml
    1. Can I somehow tell qt creator that it should ignore the lupdate_only section? it is annoying, that it pollutes my project view with these files (they already are in qrc section).

  • Lifetime Qt Champion


    You can try something like:

    SOURCE += $ $files($$PWD/qml/*.qml,true))

    Remove the space between the $ in your .pro file.

    Hope it helps

  • Hey,

    Thanks, that works.
    Only thing: qt creator is still showing the files.

Log in to reply