I'm trying to detect the device orientation in Qt 4.6.2. Qt::WA_Maemo5PortraitOrientation is no longer recognised. What should I use? I'm using the new Nokia Qt SDK Beta.
Cheers![]()
I'm trying to detect the device orientation in Qt 4.6.2. Qt::WA_Maemo5PortraitOrientation is no longer recognised. What should I use? I'm using the new Nokia Qt SDK Beta.
Cheers![]()
You can listen for QDesktopWidget::resized(int screen) signal like in this example
http://doc.qt.nokia.com/qt-maemo-4.6...-rotation.html
Also I don't know why do you state that Qt::WA_Maemo5PortraitOrientation is not recognized in Qt 4.6.2.
Did you choose Maemo target in Nokia Qt SDK setup?
In this documents, section 4.3 Set up Qt Creator:
http://www.forum.nokia.com/info/sw.n...ia_Qt_SDK.html
it actually tells about Symbian, but you should choose Maemo.
Could you please provide a screenshot of Projects Build Settings tab?
If you run grep in Nokia Qt SDK folder you will find that WA_Maemo5PortraitOrientation is really supported
Code:~/NokiaQtSDK$ grep -R WA_Maemo5PortraitOrientation * Binary file Maemo/4.6.2/sysroots/fremantle-arm-sysroot-1011-slim/usr/lib/libQtCore.so.4 matches Binary file Maemo/4.6.2/sysroots/fremantle-arm-sysroot-1011-slim/usr/lib/libQtCore.so.4.6 matches Binary file Maemo/4.6.2/sysroots/fremantle-arm-sysroot-1011-slim/usr/lib/libQtCore.so.4.6.2 matches Binary file Maemo/4.6.2/sysroots/fremantle-arm-sysroot-1011-slim/usr/lib/libQtCore.so matches Maemo/4.6.2/sysroots/fremantle-arm-sysroot-1011-slim/usr/include/QtCore/qnamespace.h: WA_Maemo5PortraitOrientation = 128, Maemo/4.6.2/sysroots/fremantle-arm-sysroot-1011-slim/usr/include/Qt/qnamespace.h: WA_Maemo5PortraitOrientation = 128, Simulator/Qt/gcc/include/QtCore/qnamespace.h: WA_Maemo5PortraitOrientation = 128, Simulator/Qt/gcc/include/Qt/qnamespace.h: WA_Maemo5PortraitOrientation = 128,
Hmm... I just noticed a strange thing. When I set the the target to Maemo, it seems to build it OK. Of course it won't send it to the device, since it doesn't have PR1.2. But at least it doesn't complain about WA_Maemo5PortraitOrientation. But as soon as I set Qt Simulator as target, it does.![]()
SDKs used for Maemo target and Qt Simulator are different. The latter doesn't have Maemo specific library, so you cannot compile Maemo-specific code there.
You should be able to run application on the device, if you install Qt 4.6.2 manually on the device
http://repository.maemo.org/pool/fre...ree/q/qt4-x11/
Cant we add those libraries externally to the Qt creator? I have found the libraies in
qt-maemo5-opensource-src-4.6.2.tar.gz so that we can compile it in the Qt creator and run in the simulator?
There are some instructions in the unzipped folder but it didn't add it to the Qt creator..
at least not for me
I really wanna wait for PR 1.2![]()
Qt Creator is just an IDE. You need Fremantle Maemo SDK to be choosen in Qt Simulator build settings (Qt Version, see the screenshot). Building Qt from the source makes no sense for several reasons, but the main one Nokia Qt SDK already contains MADDE version with Fremantle Maemo SDK if you choose a Maemo target instead of Qt Simulator.