Running Out of Battery Power
If the target devices are not constantly connected to a power outlet, but run on battery power, you must optimize power consumption. This helps to keep the total consumption at an acceptable level and to prevent users from running out of battery power. In addition, make sure that applications run successfully in low-battery condition or display a clear and informative error message.
Applications can use the QSystemBatteryInfo class to access information about the battery.
You can write a script that decreases the remaining capacity setting, to check how applications behave when the device runs out of power. You can load an example script that decreases the value for remaining capacity,
scripts/examples/runOutOfBattery.qs. For more information on loading scripts, see Scripting.
You can also check how applications behave when the target device is charging.
Change the Remaining charging time and Charging state settings in the Battery view.
Available under certain Qt licenses.
Find out more.