MemoryStatus QML Type

Provides information on the status of the RAM. More...

Import Statement: import QtApplicationManager 2.0

Properties

Methods

Detailed Description

MemoryStatus provides information on the status of the system's RAM (random-access memory). 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 {
    MemoryStatus {}
}

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
...
MemoryStatus { id: memoryStatus }
Timer {
    interval: 500
    running: true
    repeat: true
    onTriggered: memoryStatus.update()
}
Text {
    text: "memory used: " + (memoryStatus.memoryUsed / 1e6).toFixed(0) + " MB"
}

Property Documentation

[read-only] memoryUsed : int

The amount of physical memory (RAM) used in bytes.

The value of this property is updated when MemoryStatus::update is called.

See also totalMemory.


[read-only] roleNames : list<string>

Names of the roles provided by MemoryStatus when used as a MonitorModel data source.

See also MonitorModel.


[read-only] totalMemory : int

The total amount of physical memory (RAM) installed on the system in bytes.

See also MemoryStatus::memoryUsed.


Method Documentation

update()

Updates the memoryUsed property.

See also memoryUsed.


© 2021 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.