Results 1 to 3 of 3

Thread: Qt Mobility API's on Desktop builds

  1. #1
    Join Date
    Apr 2011
    Posts
    9
    Thanks
    2
    Thanked 7 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question Qt Mobility API's on Desktop builds

    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!

  2. #2
    Join Date
    Oct 2011
    Location
    Venice, Italy
    Posts
    20
    Thanked 9 Times in 9 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Qt Mobility API's on Desktop builds

    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

  3. The following user says thank you to mpita for this useful post:

    mushroom (7th October 2011)

  4. #3
    Join Date
    Apr 2011
    Posts
    9
    Thanks
    2
    Thanked 7 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Smile Re: Qt Mobility API's on Desktop builds

    Quote Originally Posted by mpita View Post
    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 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!
    Last edited by mushroom; 7th October 2011 at 00:34.

  5. The following user says thank you to mushroom for this useful post:

    -=Freaky=- (11th October 2011)

Similar Threads

  1. Using Qt Creator with many builds
    By Luc4 in forum Qt Programming
    Replies: 0
    Last Post: 24th April 2011, 16:28
  2. Qt Creator Builds application, but doesn't run it
    By tpg in forum Qt Tools
    Replies: 1
    Last Post: 2nd July 2010, 11:49
  3. Autoincrement builds counter
    By iddqd in forum Qt Programming
    Replies: 2
    Last Post: 1st February 2010, 19:45
  4. Size of Static Builds
    By Stobie in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 19th January 2010, 22:24
  5. Replies: 5
    Last Post: 31st January 2009, 08:36

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.