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
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
Updates the cpuLoad property.
See also CpuStatus::cpuLoad.