【跟小弟我一起开辟Qt之路】(3)编写小弟我们第一个Qt程序Hello World

【跟我一起开辟Qt之路】(3)编写我们第一个Qt程序Hello World

已经配置好了开发环境,很好奇Qt到底难不难,下面来就来编写我们第一个Qt程序吧:
1、打开Qt Creator开发工具

【跟小弟我一起开辟Qt之路】(3)编写小弟我们第一个Qt程序Hello World

2、创建一个QT4控制台程序。

【跟小弟我一起开辟Qt之路】(3)编写小弟我们第一个Qt程序Hello World

3、开始我们的编码:

【跟小弟我一起开辟Qt之路】(3)编写小弟我们第一个Qt程序Hello World

#include <QCoreApplication>
#include <QDebug>
int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);
    qDebug()<<"Hello Word";
    return a.exec();
}

4、运行结果:

【跟小弟我一起开辟Qt之路】(3)编写小弟我们第一个Qt程序Hello World