CpuStatus QML Type
Provides information on the CPU status. More...
Import Statement: | import QtApplicationManager 2.0 |
Properties
Methods
- update()
Detailed Description
As the name implies, CpuStatus provides information on the status of the CPU. Its property values are updated whenever the method update() is called.
You can use this component as a MonitorModel data source if you want to plot its previous values over time.
import QtQuick 2.11 import QtApplicationManager 2.0 ... MonitorModel { CpuStatus {} }
You can also use it alongside a Timer for instance, when you're only interested in its current value.
import QtQuick 2.11 import QtApplicationManager 2.0 ... CpuStatus { id: cpuStatus } Timer { interval: 500 running: true repeat: true onTriggered: cpuStatus.update() } Text { property string loadPercent: Number(cpuStatus.cpuLoad * 100).toLocaleString(Qt.locale("en_US"), 'f', 1) text: "cpuLoad: " + loadPercent + "%" }
Property Documentation
cpuCores : int |
The number of physical CPU cores that are installed on the system.
cpuLoad : real |
Holds the overall system's CPU utilization at the point when update() was last called, as a value ranging from 0 (inclusive, completely idle) to 1 (inclusive, fully busy).
See also CpuStatus::update.
Names of the roles provided by CpuStatus when used as a MonitorModel data source.
See also MonitorModel.
Method Documentation
update() |
Updates the cpuLoad property.
See also CpuStatus::cpuLoad.
© 2024 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.