您当前的位置: 首页 >  linux

DS小龙哥

暂无认证

  • 0浏览

    0关注

    679博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

Linux下获取系统的磁盘使用情况、内存使用情况使用QT界面进行显示

DS小龙哥 发布时间:2020-04-22 11:18:26 ,浏览量:0

一、环境介绍

操作系统:  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
关注
打赏
1664009229
查看更多评论
立即登录/注册

微信扫码登录

0.0420s