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.
© 2018 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.