QSystemdeviceinfo



  • Where do I find QSystemdeviceinfo? I am trying to get battery status to show on a progressBar.

    Thanks in advance



  • I tried using it and I get the follwing message back:
    C:\Users\shahal\Documents\gui-build-desktop-Qt_4_8_1_for_Desktop_-_MinGW__Qt_SDK__Debug..\gui\mainwindow.h:5: error: QSystemDeviceInfo: No such file or directory



  • never mind.. I think I should have used QsysInfo



  • Hi,
    If you want to make any changes to your post just edit it and update, no need to repost. For the solution u can check "here":http://qt-project.org/forums/viewthread/7585



  • So I dont quiet get it. Do I need to add aa qml fie to my code? If I didnt have that, how can I include something so that QSystemdeviceinfo can be found by the tool during compie?



  • Hi,
    In the documentation "QSystemDeviceInfo":http://doc.qt.nokia.com/qtmobility/qsystemdeviceinfo.html it is specified that this class is introduced in Qt Mobility 1.0.

    So it depends on what type of application you are developing and on what platform.

    Edit: "check this":http://www.developer.nokia.com/Community/Wiki/Working_with_QSystemDeviceInfo_-System_Information_API-_Part_1



  • Basically I am trying to get a window that on the press of a button will show the battery status. I will be trying this code on a beagle board. I am doing my work under the assumption that my platform is a desktop.

    To import qmobiity, ie do
    @import QtMobility.systeminfo 1.2@

    do I need to add a qml file? I tried adding a qml file and I see the following error now:

    @In file included from ..\gui\main.cpp:2:
    ..\gui/mainwindow.h:32: error: ISO C++ forbids declaration of 'QSystemDeviceInfo' with no type
    ..\gui/mainwindow.h:32: error: expected ';' before '*' token
    mingw32-make.exe[1]: *** [debug/main.o] Error 1
    mingw32-make.exe: *** [debug] Error 2
    09:55:18: The process "C:\QtSDK\mingw\bin\mingw32-make.exe" exited with code 2.
    Error while building project gui (target: Desktop)
    When executing build step 'Make'@


Log in to reply
 

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