0
点赞
收藏
分享

微信扫一扫

Hello Qt World


我还在Hello World......

#include <QCoreApplication>
#include <QDebug>

void printHello()
{
#ifdef Q_OS_WIN
    qDebug("Hello Qt World on Windows!");
    if(QSysInfo::windowsVersion() == QSysInfo::WV_10_0)
    {
        qDebug() << "Welcome to Windows 10!";
    }
#elif defined(Q_OS_LINUX)
    qDebug("Hello Qt World on Linux!");
#elif defined(Q_MV_OSX)
    qDebug("Hello Qt World on MacOS!");
#else
    qDebug() << "We don't support this platform yet!";
#endif
    qDebug() << "当前系统版本:" << QSysInfo::prettyProductName();
}

int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);
    printHello();
    return a.exec();
}

Hello Qt World_Windows

Hello Qt World_Qt_02

 

举报

相关推荐

Qt之路1--hello world

Hello,world

HELLO WORLD

Hello,World!

hello world

Hello World

0 条评论