Demos and examples problem



  • 'Demos and Examples' problem
    Hi,

    Qt is something new for me, but I like power it has I have created one project for school but I want more I can't figure out why examples don't work:/ I have installed Qt SDK on mac and linux and I have these same problems on mac and linux with these same examples.

    I try tu run 'Bluetooth Scanner Example' and these are errors:
    error: qmobilityglobal.h: No such file or directory

    error: qbluetoothlocaldevice.h: No such file or directory

    error: expected constructor, destructor, or type conversion before 'class'

    error: 'QTM_END_NAMESPACE' does not name a type

    error: 'DeviceDiscoveryDialog' was not declared in this scope

    error: expected `;' before 'd'

    error: 'd' was not declared in this scope

    I am sure that I have to configure something to work properly.
    I hope U help me



  • please help me



  • Patience is a virtue. It's acceptable to bump a topic after waiting a few days, not a few hours.



  • Same issues here.

    Documented example missing.
    Existing examples fails to compile.
    The example that did compile and run had text overwriting other text. Can't read. (Flikr) And it throws an error "invalid drawable."

    See my longish rant in response to "What should be downloaded to use Qt?"



  • you should perhaps look into this right here:
    http://doc.qt.nokia.com/qtmobility/btscanner.html
    I presume it is your example?
    There is no such file as: "qbluetoothlocaldevice.h" ... sooo why is it included somewhere in your project? ;)
    I would strongly advice you (this is what I do when my examples don't work)
    Just make a new project, get the code from the link above and just copy+paste.
    Afterwards its normally fine.

    have a nice day.



  • Ok, now after trying this myself... it simply does not work :D
    Which brings us to the question, where are the missing libraries...
    They are probably in (as stated in .pro file:)
    INCLUDEPATH += ../../src/connectivity/bluetooth
    DEPENDPATH += ../../src/connectivity/bluetooth

    well I don't have this "connectivity" BUT you should have a closer look at the auto updater of Qt Creator, perhaps you will be lucky :)

    cheers mate.



  • bq. There is no such file as: “qbluetoothlocaldevice.h” … sooo why is it included somewhere in your project? ;)

    there is,

    under device.cpp. it's one of a headers.

    I believe that on this forum must be at least one person who develop bluetooth application and know how to set up Qt to run examples.

    I think that problem is because compiler doesn't know where are libraries. I also, don't have this paths:

    INCLUDEPATH += ../../src/connectivity/bluetooth DEPENDPATH += ../../src/connectivity/bluetooth

    i found this path in file "qt-mobility-opensource-src-1.2.0.tar.gz", but why install it if qtmobility is part of Qt SDK? Ignoring this fact, I have tried install qmobility from open source but there are some errors:/

    I also did some experiment:
    'Bluetooth scanner example' is desktop app, but I add simulator and run and build for simulator. And it works-but not properly:/ scan button is not active:/

    now ,because it's my 12 attempt I also confused about what should I install:/ I reinstall Xcode and I thought after downloading Qt SDK everything will be fine. I have found these files:
    http://get.qt.nokia.com/qt/source/qt-mac-opensource-4.8.0.dmg
    http://get.qt.nokia.com/qt/source/qt-mac-opensource-4.8.0-debug-libs.dmg ,I am very confused what to do:/ I need instruction what install and in what order.



  • [quote author="ksiedzulek" date="1324840273"]bq. There is no such file as: “qbluetoothlocaldevice.h” … sooo why is it included somewhere in your project? ;)

    there is,

    under device.cpp. it's one of a headers.

    I believe that on this forum must be at least one person who develop bluetooth application and know how to set up Qt to run examples.

    I think that problem is because compiler doesn't know where are libraries. I also, don't have this paths:

    INCLUDEPATH += ../../src/connectivity/bluetooth DEPENDPATH += ../../src/connectivity/bluetooth

    i found this path in file "qt-mobility-opensource-src-1.2.0.tar.gz", but why install it if qtmobility is part of Qt SDK? Ignoring this fact, I have tried install qmobility from open source but there are some errors:/

    I also did some experiment:
    'Bluetooth scanner example' is desktop app, but I add simulator and run and build for simulator. And it works-but not properly:/ scan button is not active:/

    now ,because it's my 12 attempt I also confused about what should I install:/ I reinstall Xcode and I thought after downloading Qt SDK everything will be fine. I have found these files:
    http://get.qt.nokia.com/qt/source/qt-mac-opensource-4.8.0.dmg
    http://get.qt.nokia.com/qt/source/qt-mac-opensource-4.8.0-debug-libs.dmg ,I am very confused what to do:/ I need instruction what install and in what order.

    [/quote]

    Ok, first of all, I stated... the FILE is missing. The header is declared, yes but that is the error.
    I searched my libraries and you should too and there are no "connectivity" libraries, sooo you should probably update your Qt application and get those libraries.

    And I Just installed one package for mac back in the days sooo.... why do you need those two? :)



  • ok, I have set it up. I compile from source library and qtmobile,.. but there are still little problems-I try to get answer in second topic I create:)



  • Hi all.

    I have the same problem. Anybody can help me resolve this magic?

    [quote author="ksiedzulek" date="1324635872"]'Demos and Examples' problem
    Hi,

    Qt is something new for me, but I like power it has I have created one project for school but I want more I can't figure out why examples don't work:/ I have installed Qt SDK on mac and linux and I have these same problems on mac and linux with these same examples.

    I try tu run 'Bluetooth Scanner Example' and these are errors:
    error: qmobilityglobal.h: No such file or directory

    error: qbluetoothlocaldevice.h: No such file or directory

    error: expected constructor, destructor, or type conversion before 'class'

    error: 'QTM_END_NAMESPACE' does not name a type

    error: 'DeviceDiscoveryDialog' was not declared in this scope

    error: expected `;' before 'd'

    error: 'd' was not declared in this scope

    I am sure that I have to configure something to work properly.
    I hope U help me
    [/quote]



  • Hi, I don't remember what I did exactly, but I am sure that qtmobility (bluetooth) is not supported on mac-so only linux. I am sure that I have installed bluez on linux before installing Qt. I remember that I figured out this problem but now I don't remember because I don't use Qt anymore:/

    Have you installed bluez?



  • Hi Friends,
    I am new in Qt Development. I am trying to use bluetooth C++ API for bluetooth communucation. But when i am trying to add buletooth liberary in prokect.pro file i got following error:
    QT += bluetooth
    Project MESSAGE: Warning: unknown QT: bluetooth
    How will i use bluetooth API in my project. Please help me.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.