博客
关于我
QSysInfo获取操作系统的相关信息
阅读量:550 次
发布时间:2019-03-09

本文共 2363 字,大约阅读时间需要 7 分钟。

QSysInfo???????????????????????????????????????????????????????????????????

  • buildAbi()

    • ?????????Qt??????????????????-????-???????i386-little_endian-ilp32??
    • ?????????????????????????????????????????
    • ????Windows???????????i386-little_endian-llp64???x86_64-little_endian-llp64??
  • buildCpuArchitecture()

    • ?????????Qt???CPU?????????CPU?????
    • ?????????????????????????????????????
    • ??????????arm???x86_64??
  • currentCpuArchitecture()

    • ?????????????CPU???
    • ????????????????????????????????????
    • ????????x86_64??
  • kernelType()

    • ???????????????????winnt??Windows???darwin??Mac??
    • ???????????????????????????
    • ????Windows??????winnt??
  • kernelVersion()

    • ?????????????????????10.0.18362.1??Windows 10??
    • ?????????????????????????????????
    • ????????10.0.18362.1??
  • prettyProductName?productType?productVersion

    • ?????????????????????Windows 10 Pro???????
    • ??????????????????????
    • ???productVersion???10.0.18362.1??
  • WindowsVersion

    • ???????Windows???????????WV_WINDOWS10??
    • ???????????????????????????Windows????????
    • ????????WindowsVersion: 192????????0xc0??Windows 10?
  • ???????

    • ??Qt???????Q_OS_WIN?Q_OS_OSX???????????????????????

    ?????

    #include 
    #include
    int main(int argc, char **argv) { QCoreApplication app(argc, argv); qDebug() << "WindowsVersion:" << QSysInfo::windowsVersion(); qDebug() << "buildAbi:" << QSysInfo::buildAbi(); qDebug() << "buildCpuArchitecture:" << QSysInfo::buildCpuArchitecture(); qDebug() << "currentCpuArchitecture:" << QSysInfo::currentCpuArchitecture(); qDebug() << "kernelType:" << QSysInfo::kernelType(); qDebug() << "kernelVersion:" << QSysInfo::kernelVersion(); qDebug() << "machineHostName:" << QSysInfo::machineHostName(); qDebug() << "prettyProductName:" << QSysInfo::prettyProductName(); qDebug() << "productType:" << QSysInfo::productType(); qDebug() << "productVersion:" << QSysInfo::productVersion(); return app.exec();}

    ?????

    • WindowsVersion?192?????????0xc0???Windows 10??
    • buildAbi?i386-little_endian-ilp32?32?????
    • currentCpuArchitecture?x86_64?64?????
    • kernelType?winnt?Windows????
    • kernelVersion?10.0.18362.1?Windows 10????
    • machineHostName???????
    • ???????????Windows 10 Pro??

    ?????

    • ???????QSysInfo::windowsVersion() == QSysInfo::WV_WINDOWS10????????
    • ????????currentCpuArchitecture()??????64????????????

    ???QSysInfo???????????????????????????????????????????????????????????????????????????????????????????

    转载地址:http://jffsz.baihongyu.com/

    你可能感兴趣的文章
    Percona Server 5.6 安装TokuDB
    查看>>
    percona-xtrabackup 备份
    查看>>
    SpringBoot集成OpenOffice实现doc文档转html
    查看>>
    ROS中机器人的强化学习路径规划器
    查看>>
    Perl的基本語法
    查看>>
    perl输出中文有乱码
    查看>>
    Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password). 大数据ssh权限问题 hadoop起不来 hadoopssh错
    查看>>
    PermissionError:Python 中的 [Errno 13]
    查看>>
    PermissionError:[Errno 13] 权限被拒绝:‘/manage.py‘
    查看>>
    Permutation
    查看>>
    PE文件,节头有感IMAGE_SECTION_HEADER
    查看>>
    PE知识复习之PE的导入表
    查看>>
    PGOS:今天动手给电脑装青苹果Win7 X64位系统
    查看>>
    PgSQL · 特性分析 · PG主备流复制机制
    查看>>
    Phoenix简介_安装部署_以及连接使用---大数据之Hbase工作笔记0035
    查看>>
    phoenix连接hbase报错Can not resolve hadoop120, please check your network_记录026---大数据工作笔记0187
    查看>>
    Reids配置文件redis.conf中文详解
    查看>>
    PHP
    查看>>
    Regular Expression Notes
    查看>>
    PHP $FILES error码对应错误信息
    查看>>