QT Programming 1

1.控制台输出 helloworld

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

2.控制台输出 helloworld(QString应用)

#include<QtCore/QCoreApplication>
#include<QDebug>
int main(int argc,char *argv[]){
    QCoreApplication a(argc,argv);
    QString mStr="hellowlrd";
    qDebug() << mStr;
    return a.exec();
}






原文地址:https://www.cnblogs.com/dyllove98/p/3162958.html