qt 小程序 运行出错误
#include<QApplication>#include<QtGui>#include<QString>#include<QObject>int main(int argc,char *argv[]){ QApplication app(argc,argv); QWidget *w=NULL; QVBoxLayout *vb=NULL; QLabel *l=NULL;// QPushButton *pb=NULL; QLineEdit *le=NULL; QString pas("\0"); vb->addWidget(l); vb->addWidget(le); vb->addWidget(pb); w->setLayout(vb); l->setText(QObject::tr("QQ2012")); le->setEchoMode(QLineEdit::Password); pb->setText(QObject::tr("Login")); pas=le->text(); w->show(); return app.exec();}