首页| 论坛| 消息

标题:hello这个最简单的程序 出问题了--请教大家 不胜感激
作者:fzusuper
日期:2008-11-27 17:56
内容:

为什么我的hello出问题,我在#qmake-project #qmake #make都没有提示错误,但是在生成可执行hello后,我运行./hello
结果提示:
Session management error:Authentication Rejected.None of the authentication protocols specified are supported and host-based authentication failed
我就不明白错在哪里,另外我是装QT3 操作系统是redhat9 2.4.20
请大侠指教,不胜感激~~!!
贴上原程序:#include
#incldue
int main(int argc,char **argv)
{
QAppliaction app(argc,argv);
QLabel *hello=new QLabel(“hello Qt/Embedded !”,0);
app.setMainWidget(hello);
hello->show();
return app.exec();
}


#1 [llm08 12-15 11:44]
可以把程序改成这样试试:
#nclude
#include
#include
class Hello:public QWidget
{
public:
Hello();
private:
QLabel *label;
};
Hello::Hello()
{
setGeometry(100,100,200,200);
label = new QLabel("hello Qt/Embedded !",this);
}
int main(int argc,char **argv)
{
QAppliaction app(argc,argv);
Hello hello;
app.setMainWidget(hello);
hello.show();
return app.exec();
}

回复 发表
主题 版块