头文件:
#pragma once
#include <QMutex>
#include <QDebug>
#include <map>
class SystemInfomation
{
public:
SystemInfomation();
~SystemInfomation();
#ifdef Q_OS_MAC
static std::map<std::string, std::string> parse_console(const std::string& name, char delimiter);
#endif
static QString get_unique_id(); // uuid
static QString get_cpu_info_from_registry(); // cpu
static QString get_ram_info(); // ram
static QString get_os_info(); // os
static QString get_display_info(); // display
};
CPP:
#include "systeminfomation.h"
#include <QSysInfo>
#include <algorithm>
#include