×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Registered User
    Join Date
    May 2010
    Posts
    1

    Using QBluetooth library in Qt Creator

    I like to use QBluetooth library for my project (Nokia 5800 app).

    I did these steps - http://wiki.forum.nokia.com/index.ph...etooth_library -> Including the library -> Use the binaries :

    1) I copied library files to epoc32 folder


    2) I copied this block to my .pro file

    Code:
    symbian{
           INCLUDEPATH += /epoc32/include/QBluetooth
           LIBS += -lQBluetooth
     
           customrules.pkg_prerules  = \
    	";QBluetooth" \
    	"@\"$(EPOCROOT)Epoc32/InstallToDevice/QBluetooth_selfsigned.sisx\",(0xA003328D)"\
    	" "	
     
    	DEPLOYMENT += customrules
    }

    And I have problem:

    If I use in code #include <QBluetooth>, Qt Creator show error: QBluetooth: No such file or directory...

    (Sorry for my english)

  2. #2
    Registered User
    Join Date
    May 2009
    Location
    Greece
    Posts
    191

    Re: Using QBluetooth library in Qt Creator

    First of all make sure that you are building the project at Phone Debug (or Release) configuration. Any other configuration (Qt Simulator for instance) will not do. This will fix the include problem.

    Also in Qt Creator the following line:
    Code:
    "@\"$(EPOCROOT)Epoc32/InstallToDevice/QBluetooth_selfsigned.sisx\",(0xA003328D)"\
    must be changed into
    Code:
    "@\"$$(EPOCROOT)Epoc32/InstallToDevice/QBluetooth_selfsigned.sisx\",(0xA003328D)"\
    (we add one more '$')

    Now you should be fine!
    Last edited by favoritas37; 2011-02-20 at 19:49. Reason: visual edit

  3. #3
    Registered User
    Join Date
    May 2009
    Location
    Greece
    Posts
    191

    Re: Using QBluetooth library in Qt Creator

    One more thing, to include the library write #include <QBluetooth.h>
    The .h is needed.


  4. #4
    Registered User
    Join Date
    Mar 2011
    Posts
    3

    Re: Using QBluetooth library in Qt Creator

    Hello.
    I've got a question: where exactly headers must be placed?
    I have builded QBluetooth for Windows and writed to the .pro file of my program:
    Code:
    LIBS += -lQBluetooth -L$$(QTDIR)/QBluetooth/bin
    INCLUDEPATH += ..\QBluetooth
    HEADERS += ..\QBluetooth\QBluetooth.h
    and got errors
    Code:
    In file included from ..\bluetooth-computer\main.cpp:2:
    
    ..\bluetooth-computer\/widget.h:6:24: error: QBluetooth.h: No such file or directory
    
    ..\bluetooth-computer\/widget.h:7:23: error: QBtDevice.h: No such file or directory
    
    In file included from ..\bluetooth-computer\main.cpp:2:
    
    ..\bluetooth-computer\/widget.h:24: error: 'QBtDevice' was not declared in this scope
    
    ..\bluetooth-computer\/widget.h:24: error: template argument 1 is invalid
    
    ..\bluetooth-computer\/widget.h:28: error: 'QBtDevice' has not been declared
    I tried to copy HEADERS and INCLUDEPATH from QBluetooth.pro and it did not help.
    Last edited by colorfulFOOL; 2011-03-11 at 18:44.

  5. #5
    Registered User
    Join Date
    Mar 2011
    Posts
    3

    Re: Using QBluetooth library in Qt Creator

    Well, I copied all QBluetooth .h files to the same directory as library file and errrors seems to disappear.
    But after building is finished, I got
    Code:
    Starting E:\Qt\Projects\bluetooth-computer-build-desktop\debug\bluetooth-computer.exe...
    The process could not be started!
    Last edited by colorfulFOOL; 2011-03-11 at 22:26.

  6. #6
    Nokia Developer Moderator
    Join Date
    Sep 2004
    Location
    Tampere, Finland
    Posts
    11,355

    Re: Using QBluetooth library in Qt Creator

    Did anyone say that the QBluetooth library should work on desktop PC as well? Unless you have strong reasons to think that to be the case, I would suggest that you limit yourself to using it in Symbian targeted builds.
    -- Lucian

    If you are not yet a DVLUP member it is time to correct that mistake :) Click here to join: http://www.dvlup.com/lucian/Invite

  7. #7
    Registered User
    Join Date
    Mar 2011
    Posts
    3

    Re: Using QBluetooth library in Qt Creator

    It is written here.
    And after several days of problems solving I got it working in Windows.

  8. #8
    Nokia Developer Moderator
    Join Date
    Sep 2004
    Location
    Tampere, Finland
    Posts
    11,355

    Re: Using QBluetooth library in Qt Creator

    Nice. Apparently I stopped reading just before "... and Windows."
    -- Lucian

    If you are not yet a DVLUP member it is time to correct that mistake :) Click here to join: http://www.dvlup.com/lucian/Invite

  9. #9
    Registered User
    Join Date
    Mar 2012
    Posts
    1

    Unhappy Re: Using QBluetooth library in Qt Creator

    i also have the same problem
    can any body help us ?

Similar Threads

  1. Replies: 7
    Last Post: 2010-07-14, 14:58
  2. trouble using QBluetooth library
    By anujk3 in forum Qt
    Replies: 2
    Last Post: 2010-07-10, 21:29

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •