Using lupdate tool - qt

I'm using Qt 4.7.1 on window vista.I want to make my qt application to be translatable.
How can I use the Lupdate tool to generate .ts files?
From where I can run it from Qt creator or Qt linguist?

C:\Qt\4.7.4\bin
or where ever your QT files are found, just check the bin folder.

Google told me this:
http://doc.qt.nokia.com/4.7-snapshot/linguist-manager.html

Related

Integrating ros to an existing qt application

I have a QML, OpenCV application on qt5 which uses qmake and has a .pro file. I want to add publishers/subscribers to my qt project to publish video stream and instructions etc. I tried to use catkin_create_qt_pkg command to create a template and transfer my project to the template but there were numerous problems which made me question my approach. The ros-qt template uses Cmakelist and .ui instead of qml. So, I will need to change some things to integrate them.
First, is it possible to use ros with qmake and .pro instead of cmake. It would be easier to add just ros publishers and listeners to my existing application than changing the entire QML application. If not, how do I convert qmake and .pro to cmake and Cmakelist.txt (assuming that I can use QML with ros). Also, although it doesn't sound well, is it possible to use .pro for qt and Cmakelist.txt for ros in the same package?
Second, is it safe to use qt5 and qml with ros? The ros_qt app template uses qt4, not qt5. Here is the app template.

How to compile this qt program(There is no any pro file)?

I download the code(a game made with qt 3d) from Qt learning websites
After decompressing it, all i found are some qml file and photos. There is no any c++ file or the pro file. How can i open this as a project not a file in the qt creator and run it?
Thanks
It does not contain any source code, just qml files. It is entirely written in interpreted QML. You would need to run the "main.qml", which is the "game.qml" here, through the qml viewer as follows:
qmlviewer-qt4 game.qml
or
qmlviewer-qt4 game.qml
These applications are installed by the qt/qtquick and qtquick1 packages on my Linux box.

QT multilanguage app

I am new in Qt framework and now, I want to create an app which supports multi-language display. I known there is a way to do: Qt Linguist. I searched, and archieved some information about lupdate, lrelease ... But I just have Qt Creator IDE, how can I run or compile lupdate, lrelease ???
How can I create *.ts file ?
Please give me some code example or guide to do. (I often use Qt Designer to create GUI)
As far as i know, there is no option in QtCreator to use QtLinguist - you have to do it manually. Here you have an excellent documentation about how to do it. I have learned from there also.

Convert project Qt to file .exe for window

Hello i'm a young develop on Qt. I want to know that can we convert project Qt (header, source, form, resource) to a file can run without Qt Creator? And how can we convert it to a file executable on window (.exe)?
The compiler is responsible for making an executable out of the source code. This has nothing to do with Qt.
When you start a program from the QtCreator an executable file is built by the compiler, then started. Have a look in your project folder to find that .exe file.
You dont have to do anything special. Each Qt project has a .pro file that is used for compiling. You need to use qmake on the command line with the .pro file as input. This will generate a makefile that you can then give to nmake.exe (if using Visual Studio compilers) or mingw-make (if you are uisng mingw compilers) to build. These steps will compile your source code into the .exe. Look through documentation of qmake to know more. Qt Creator also does the same steps and you can check out the buildlog in Qt Creator to see it working.
Yes, the exe file that you compile with Qt Creator or alternatively some other IDE or compiler is technically all you need to run the project from there on, except you need to have the linked Qt libraries somehow available to the executable. This is especially important if you plan to run it on a machine different from the one you developed it on. See the Qt documentation on Deploying Qt Applications for other details you may need to consider in that case.

How can I create a new Qt localisation for Qt itself?

Our application is localised and I have pulled in all the standard Qt_*.qm files as well so that my Qt dialogs are translated as much as possible.
However one of our distributors wants to add the Danish translation and its not in the standard Qt translation files.
How can I get Qt to create the file so I can send it off for translation?
There is some information about translation of Qt itself:
http://doc.trolltech.com/4.6/internationalization.html#produce-translations
it's said that templates for qt translation (*.ts files) should be in the ${QTDIR}/translations directory. I can't see them in my Qt4 installation from official Ubuntu repository but I think they should be included in distributions provided by Nokia on official download page.
Edit
Idea how to generate new empty *.ts file for qt itself can be found in translations/translations.pri directory of qt sources. For Qt 4.6.3 it will be
lupdate -locations relative -no-ui-lines -I../include -I../include/Qt corelib gui-ts ../qt_my.ts

Resources