Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. How to read battery level on Qt 5.4.1?

How to read battery level on Qt 5.4.1?

Scheduled Pinned Locked Moved Mobile and Embedded
battery info
3 Posts 3 Posters 3.3k Views 2 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.
  • G Offline
    G Offline
    gardiol
    wrote on last edited by
    #1

    Hi all!
    i am trying without success to find out how to read the battery level on Qt 5.4.1 (es: android or laptop).
    the so called QBatteryInfo class is nowhere to be found, and of course QtMobility is also gone, so what should i do? Either QML or C++ solution is ok for me!

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      The QtSystems module is what you are looking for. It contains QBatteryInfo

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • deleted57D Offline
        deleted57D Offline
        deleted57
        wrote on last edited by
        #3

        For android here a specific solution mixed java and C++ code:

        QML: Get Android battery level and status

        1 Reply Last reply
        -1

        • Login

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