QString getSysInfo() { auto os = QOperatingSystemVersion::current(); auto str = QSysInfo::productVersion(); auto info = QSysInfo::currentCpuArchitecture(); if(info == "power" || info == "i386" || info == "sparc") { info = "32bit"; } else if(info == "power64" || info == "ia64" || info == "sparcv9" || info == "x86_64") { info = "64bit"; } else { info = "unknown"; } auto sysinfo = os.name() + " " + str + " " + info+"("+QSysInfo::kernelVersion()+")"; return sysinfo; }
QT获取系统版本号,包含小版本号
最新推荐文章于 2024-06-05 15:18:41 发布