Symbian-Developers
The Official Developers Section => Symbian Software Development Discussions => The Developers Section => Qt Application Development => Topic started by: huellif on August 20, 2013, 04:10:33 pm
-
Most of you use QRC to hide your code, graphics etc. in .exe file.
the usual way is put "#" in front of the files path in QML/graphics folder before build, but this does hide the files also from QtCreator.
I guess you want to show the files in QtCreator always + hide them always from .sis, so what to do?
check e.g. this .pro file:
folder_01.source = qml/Gmail
folder_01.target = qml
DEPLOYMENTFOLDERS = folder_01
most of you do this before of an build:
#folder_01.source = qml/Gmail
#folder_01.target = qml
#DEPLOYMENTFOLDERS = folder_01
simply remove all this lines and add:
#hack to hide QML and .js from build, but show them in QtCreator + for lupdate
{ SOURCES += qml\Gmail\*.qml } \
{ SOURCES += qml\Gmail\js\*.js } \
works fine or?
QtCreator does ignore the { } and shows the files, build qmake and sisbuild don't include the files.
another feature:
if you want to make a multilanguage app you can run:
lupdate Projectname.pro -ts translation.ts
to create a single .ts file which contains ALL QML strings for QtLinguist
-
Nice trick! Exactly what I needed! ;) Thanks! +1 Rep. added.
-
;)
do you already know how QRC works?
check here:
http://sdf.allstarsoftware.co.uk/qt-application-development/how-to-qt-splashscreen-for-qml-apps/?action=dlattach;attach=13814
-
Putting this stuff in "SOURCES" breaks compilation for Harmattan platform, so I suggest using simply "OTHER_FILES", though it isn't working properly with lupdate, so you still need to use this simple hack to get lupdate to work.
huellif, could you someday explain internationalization in QtQuick? I was able to generate .ts file, but I have no idea, what should I do with it after that, not counting putting translations in this file. They simply weren't loaded.
-
it's not really hard.
If you want to I can create a multilanguage hello world for this section.
In DelightApp (app for our CFWs) I implemented it successfully based on Dicksons Tweetian code.
You have to compile the .ts file via lrelease, include them in .sis or .exe
and in main.cpp you have to load them
-
Today I finally Used this Trick! And It Helped A lot :) Thanks again for Posting :)