Latest Qt and Qt mobility evaluation on Maemo
(Achipa -) |
|||
| Line 1: | Line 1: | ||
[[Category:Maemo]][[Category:Qt Mobility]] | [[Category:Maemo]][[Category:Qt Mobility]] | ||
| − | {{Abstract|This article explains how to get and install the latest '' | + | {{Abstract|This article explains how to get and install the latest ''community supported'' versions of Qt and Qt Mobility for Maemo 5 from the Extras-devel repository.}} |
| − | Note that these libraries cannot be used for publishing software to Ovi nor do they come with any warranty, but are good for evaluating real-life performance and behavior | + | Note that these libraries cannot be used for publishing software to Ovi nor do they come with any warranty, but are good for evaluating real-life performance and behavior. They are installed in parallel to the Maemo5 libraries, so they pose minimal danger to your existing install and do not affect stable software written for Maemo. |
NOTE: All the packages referenced are found in extras-devel | NOTE: All the packages referenced are found in extras-devel | ||
| − | = Qt Mobility 1. | + | = Qt Mobility 1.2 = |
| − | [http://maemo.org/ | + | [http://repository.maemo.org/extras-devel/pool/fremantle/free/q/qt-mobility/libqtm-12-dev_1.2.0+git20111104-0nd~fremantle5_armel.deb libqtm-12-dev package] |
| − | Both QtSDK and Scratchbox environments are supported and the 1. | + | Both QtSDK and Scratchbox environments are supported and the 1.2 mobility packages are available from Extras. Use the environment you're more familiar with. |
=== QtSDK install === | === QtSDK install === | ||
| − | Download the mobility packages from maemo.org ([http://repository.maemo.org/extras-devel/pool/fremantle/free/q/qt- | + | Download the mobility packages from maemo.org ([http://repository.maemo.org/extras-devel/pool/fremantle/free/q/qt-mobility/libqtm-12-dev_1.2.0+git20111104-0nd~fremantle5_armel.deb deb package here]) |
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
Open a shell prompt and go to the directory with the downloaded files and install them into your rootstrap with: | Open a shell prompt and go to the directory with the downloaded files and install them into your rootstrap with: | ||
'''Linux''' | '''Linux''' | ||
| − | /path/to/your/QtSDK/Maemo/4.6.2/bin/mad-admin xdpkg -i | + | /path/to/your/QtSDK/Maemo/4.6.2/bin/mad-admin xdpkg -i libqtm-12-dev_1.2.0+git20111104-0nd~fremantle5_armel.deb libqtm-12_1.2.0+git20111104-0nd~fremantle5_armel.deb |
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
'''Windows''' | '''Windows''' | ||
| − | \path\to\your\QtSDK\Maemo\4.6.2\wbin\mad-admin.exe xdpkg -i | + | \path\to\your\QtSDK\Maemo\4.6.2\wbin\mad-admin.exe xdpkg -i libqtm-12-dev_1.2.0+git20111104-0nd~fremantle5_armel.deb libqtm-12_1.2.0+git20111104-0nd~fremantle5_armel.deb |
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
=== Scratchbox install === | === Scratchbox install === | ||
| Line 53: | Line 29: | ||
apt-get update | apt-get update | ||
| − | apt-get install libqtm- | + | apt-get install libqtm-12-dev |
=== Install on actual device === | === Install on actual device === | ||
| − | apt-get install libqtm- | + | apt-get install libqtm-12 |
=== Usage === | === Usage === | ||
| Line 63: | Line 39: | ||
For Qt to know which mobility version to use, you will need to specify the following | For Qt to know which mobility version to use, you will need to specify the following | ||
maemo5 { | maemo5 { | ||
| − | CONFIG += | + | CONFIG += mobility12 |
} else { | } else { | ||
CONFIG += mobility | CONFIG += mobility | ||
| Line 84: | Line 60: | ||
(Ville) Confirmed to work: QmlMapViewer example with qtm-12 ("import QtMobility.location 1.1", Map, MapCircle, MapMouseArea). Does *not* work with qtm-11. | (Ville) Confirmed to work: QmlMapViewer example with qtm-12 ("import QtMobility.location 1.1", Map, MapCircle, MapMouseArea). Does *not* work with qtm-11. | ||
| − | |||
| − | = | + | = Using the libraries from QML = |
| − | + | If you want to use the QML components of Qt Mobility, you have to add their paths to the QML search path. For the '''qmlviewer''' application, you can use the <code>-I /opt/qtm12/imports</code> command line parameter. In C++, you can do something like this: | |
| − | + | viewer.engine()->addImportPath(QString("/opt/qtm12/imports")); | |
| − | + | viewer.engine()->addPluginPath(QString("/opt/qtm12/plugins")); | |
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | If you | + | If you are using PySide, you can achieve the same using: |
| − | viewer.engine() | + | viewer.engine().addImportPath('/opt/qtm12/imports') |
| − | viewer.engine() | + | viewer.engine().addPluginPath('/opt/qtm12/plugins') |
| − | |||
| − | + | = Qt Mobility 1.1 = | |
| − | + | ||
| − | + | Qt Mobility 1.1.x on Maemo5 is no longer maintained. Please use 1.2.x | |
Revision as of 11:43, 14 November 2011
This article explains how to get and install the latest community supported versions of Qt and Qt Mobility for Maemo 5 from the Extras-devel repository.
Note that these libraries cannot be used for publishing software to Ovi nor do they come with any warranty, but are good for evaluating real-life performance and behavior. They are installed in parallel to the Maemo5 libraries, so they pose minimal danger to your existing install and do not affect stable software written for Maemo.
NOTE: All the packages referenced are found in extras-devel
Contents |
Qt Mobility 1.2
Both QtSDK and Scratchbox environments are supported and the 1.2 mobility packages are available from Extras. Use the environment you're more familiar with.
QtSDK install
Download the mobility packages from maemo.org (deb package here)
Open a shell prompt and go to the directory with the downloaded files and install them into your rootstrap with:
Linux
/path/to/your/QtSDK/Maemo/4.6.2/bin/mad-admin xdpkg -i libqtm-12-dev_1.2.0+git20111104-0nd~fremantle5_armel.deb libqtm-12_1.2.0+git20111104-0nd~fremantle5_armel.deb
Windows
\path\to\your\QtSDK\Maemo\4.6.2\wbin\mad-admin.exe xdpkg -i libqtm-12-dev_1.2.0+git20111104-0nd~fremantle5_armel.deb libqtm-12_1.2.0+git20111104-0nd~fremantle5_armel.deb
Scratchbox install
Make sure extras-devel is enabled in you repositories, and do
apt-get update apt-get install libqtm-12-dev
Install on actual device
apt-get install libqtm-12
Usage
For Qt to know which mobility version to use, you will need to specify the following
maemo5 {
CONFIG += mobility12
} else {
CONFIG += mobility
}
in your projects .pro file (instead of CONFIG += mobility). For help and discussion about this version, see the maemo.org community developer thread. Note that you don't have to have to add the config option if you are just using the QML bindings.
Mobility sensor orientation
Note that compared to other Nokia devices, the N900 has a landscape default, i.e. the X and Y accelerometer axis' are swapped. If you would like your code to work with the same axis on all Nokia devices, insert
qputenv("N900_PORTRAIT_SENSORS", "1");
in your main function (for details on this, see http://bugreports.qt.nokia.com/browse/QTMOBILITY-1044 )
Status:
(Ville) Confirmed to work: Multimedia ("player" demo can stream rtsp video, full screen works)
(Ville) Confirmed to work: QmlMapViewer example with qtm-12 ("import QtMobility.location 1.1", Map, MapCircle, MapMouseArea). Does *not* work with qtm-11.
Using the libraries from QML
If you want to use the QML components of Qt Mobility, you have to add their paths to the QML search path. For the qmlviewer application, you can use the-I /opt/qtm12/imports
viewer.engine()->addImportPath(QString("/opt/qtm12/imports"));
viewer.engine()->addPluginPath(QString("/opt/qtm12/plugins"));
If you are using PySide, you can achieve the same using:
viewer.engine().addImportPath('/opt/qtm12/imports')
viewer.engine().addPluginPath('/opt/qtm12/plugins')
Qt Mobility 1.1
Qt Mobility 1.1.x on Maemo5 is no longer maintained. Please use 1.2.x

