Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QSystemdeviceinfo
Qt 6.11 is out! See what's new in the release blog

QSystemdeviceinfo

Scheduled Pinned Locked Moved General and Desktop
7 Posts 1 Posters 4.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • ? This user is from outside of this forum
    ? This user is from outside of this forum
    Guest
    wrote on last edited by
    #1

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

    Thanks in advance

    1 Reply Last reply
    0
    • ? This user is from outside of this forum
      ? This user is from outside of this forum
      Guest
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      • ? This user is from outside of this forum
        ? This user is from outside of this forum
        Guest
        wrote on last edited by
        #3

        never mind.. I think I should have used QsysInfo

        1 Reply Last reply
        0
        • S Offline
          S Offline
          Sam
          wrote on last edited by
          #4

          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

          1 Reply Last reply
          0
          • ? This user is from outside of this forum
            ? This user is from outside of this forum
            Guest
            wrote on last edited by
            #5

            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?

            1 Reply Last reply
            0
            • S Offline
              S Offline
              Sam
              wrote on last edited by
              #6

              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

              1 Reply Last reply
              0
              • ? This user is from outside of this forum
                ? This user is from outside of this forum
                Guest
                wrote on last edited by
                #7

                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'@

                1 Reply Last reply
                0

                • Login

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved