一、环境介绍
操作系统: ubuntu 18.04 64位 PC机
QT版本: 5.12
二、运行效果图mainwindow.cpp代码:
#include "widget.h"
#include "ui_widget.h"
#include
#include
#include
#include
Widget::Widget(QWidget *parent)
: QWidget(parent)
, ui(new Ui::Widget)
{
ui->setupUi(this);
QTimer::singleShot(1000, this, SLOT(GetSystemInfo()));
}
void Widget::GetSystemInfo(void)
{
/*1. 获取当前系统磁盘使用情况*/
/*
* 格式: /dev/sda1