标题:按照tutorial写的程序怎么编译通不过啊.帮忙看看.
作者:lemon
日期:2006-06-22 10:04
内容:
就是照着pizzaentry的例子写的.
MyformImpl.cpp
#include "MyformImpl.h"
#include
void MyformImpl::sendOrder()
{
QMessageBox::information( this, "Myform Information", "you order has been sent", QMessageBox::Ok );
}
MyformImpl.h
#ifndef MYFORMIMPL_H
#define MYFORMIMPL_H
#include "Myform.h"
class MyformImpl : public Myform
{
Q_OBJECT
public :
MyformImpl( Qwidget *parent = 0, const char *name = 0, bool modal = FALSE, WFlags fl = 0) : Myform( parent, name, modal, fl ){}
public slots:
virtual void sendOrder();
};
#endif
编译错误:
In file included from MyformImpl.cpp:1:
MyformImpl.h:11: parse error before `*' token
MyformImpl.h:11: missing ';' before right brace
MyformImpl.h:12: semicolon missing after declaration of `MyformImpl'
MyformImpl.h:12: parse error before `:' token
MyformImpl.cpp:6: no `void MyformImpl::sendOrder()' member function declared in
class `MyformImpl'
make: *** Error 1
#1 [lemon 06-22 10:17]
噢,找到错误了,有个笔误.
还有个问题,怎么把这个程序编译成qte下的程序呢?我把$QTDIR指向qt-2.3.2是可疑通过的,指向qte-2.3.7就不行 了.怎么改呢?