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();
}






posted @ 2013-06-29 22:15  jlins  阅读(185)  评论(0编辑  收藏  举报