请问gtk禁止窗口拖动 和 去掉窗口右上角关闭按钮怎么实现

在编辑helloqt中,代码是抄书上的,应该没问题的,但是编译过程中出现如下问题:

wyk3.cpp:2:22: error: QpushButton: 没有那个文件或目录
wyk3.cpp:3: error: conflicting declaration ‘int** argc’
wyk3.cpp:3: error: ‘argc’ has a previous declaration as ‘int argc’
wyk3.cpp:3: warning: ‘int main(int)’ takes only zero or two arguments
wyk3.cpp: In function ‘int main(int)’:
wyk3.cpp:5: error: ‘argv’ was not declared in this scope
wyk3.cpp:5: error: ‘QPushbutton’ was not declared in this scope
wyk3.cpp:5: error: expected ‘;’ before ‘pushbutton’
wyk3.cpp:6: error: ‘pushButton’ was not declared in this scope
wyk3.cpp:7: error: ‘Q0bject’ has not been declared

我敲的代码是:
#include<QApplication>
#include<QpushButton>
int main(int argc,char *argc[])
{
QApplication app(argc,argv);
QPushbutton pushbutton(Q0bject::tr("hello Qt!"));
pushButton.show();
Q0bject::connect(&pushButton,SIGNAL(clicked()),&app,SLOT(quit()));
return app.exec();
}

作者: har4   发布时间: 2010-11-04

#include<QpushButton>改成#include<QPushButton> ?
猜的~

作者: linlee   发布时间: 2010-11-05

你这个程序不完整呢!应该要申明个构造函数的!
你应该找个完整的,而且能编译通过的工程,学习学习!
我也是刚学

作者: crh8539   发布时间: 2010-11-07