View Full Version : Qt Mobility API's on Desktop builds
mushroom
6th October 2011, 15:04
Hi,
I'm working on a bluetooth server application that uses the Connectivity API from Qt Mobility, but it seems that it doesn't ship by default to the desktop. I've got it to work on mobile builds though.
Is there any way I could use the headers from the mobile and/or simulator builds on the desktop?
If not, are there any good alternatives?
Thanks!
mpita
6th October 2011, 15:18
Just recompile the QtMobility specifying the Desktop framework as target.
Example:
open a qt shell
go inside the qt mobility source directory
launch configure.bat -prefix C:\path\to\your\qt\sdk\Desktop\... [here you can tell that you want only connectivity module, read configure.bat -help]
mingw32-make
mingw32-make install
That's what I successfully did on Linux, Mac and Win
I still don't know why QtMobility is installed only for Mobile...
Ciao!
Marco
mushroom
6th October 2011, 23:24
Just recompile the QtMobility specifying the Desktop framework as target.
Example:
open a qt shell
go inside the qt mobility source directory
launch configure.bat -prefix C:\path\to\your\qt\sdk\Desktop\... [here you can tell that you want only connectivity module, read configure.bat -help]
mingw32-make
mingw32-make install
That's what I successfully did on Linux, Mac and Win
I still don't know why QtMobility is installed only for Mobile...
Ciao!
Marco
Works! I compiled Qt Mobility from source by following this (http://doc.qt.nokia.com/qtmobility-1.2/installation.html) guide on my Debian installation.
I did:
sh ./configure -prefix /FULL/PATH/TO/QtSDK/Desktop/Qt/474/gcc
make
make install
I had to install a few development libraries (OpenGL, ALSA, etc...) for make to finish successfully but eventually everything worked.
Added this to my .pro file:
CONFIG += mobility
MOBILITY += connectivity
and ran into some undefined reference trouble and Qt not finding the libraries, but I just messed around for a while then had to run qmake and rebuild the project and everything worked.
Thanks Marco! :)
EDIT:
I forgot to mention an important step, you need to copy these 2 files:
mobility.prf
mobilityconfig.prf
otherwise QtCreator won't find the header files.
I copied my prf files from:
PATH/TO/SDK/QtSDK/Madde/sysroots/harmattan-meego-arm-sysroot-1134-slim/usr/share/qt4/mkspecs/features
to:
PATH/TO/SDK/QtSDK/Desktop/Qt/474/gcc/mkspecs/features/
Then ran qmake, rebuilt the project and it worked!
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.