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. Qt c++: how to check battery level (Laptop)
Forum Updated to NodeBB v4.3 + New Features

Qt c++: how to check battery level (Laptop)

Scheduled Pinned Locked Moved General and Desktop
4 Posts 4 Posters 5.0k 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.
  • S Offline
    S Offline
    spode
    wrote on last edited by
    #1

    How to get to know the battery level of a laptop in C++?

    1 Reply Last reply
    0
    • JeroentjehomeJ Offline
      JeroentjehomeJ Offline
      Jeroentjehome
      wrote on last edited by
      #2

      Better start looking for a WinAPI or other OS options. It's not really C++ issue to handle battery levels.
      good luck finding!

      Greetz, Jeroen

      1 Reply Last reply
      0
      • W Offline
        W Offline
        Wurstinator
        wrote on last edited by
        #3

        For Windows check out GetSystemPowerStatus function of the WinAPI.

        1 Reply Last reply
        0
        • T Offline
          T Offline
          tomma
          wrote on last edited by
          #4

          Both Qt-Mobilty and Qt5 has API:
          http://doc.qt.nokia.com/qtmobility/qsystembatteryinfo.html
          http://qt-project.org/doc/qt-5.0/qbatteryinfo.html
          I have no idea which platforms are supported.

          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