• 4311阅读
  • 1回复

qt 实例化问题,求助 急 [复制链接]

上一主题 下一主题
离线lysong
 
只看楼主 倒序阅读 楼主  发表于: 2010-08-17
— 本帖被 XChinux 执行加亮操作(2010-09-07) —
本人做的是 qt for symbian 的开发
client.h如下:cpp文件就不写了
#ifndef NFCLIENT_H
#define NFCLIENT_H

#include <QAbstractSocket>
#include <QTcpSocket>

class Client : public QTcpSocket{
  Q_OBJECT
public:
  explicit Client(QObject *parent = 0);

  void sendFile(const QString& file, const QHostAddress& dest);
  void sendFile(const QString& file, const QString& dest);
  void sendEOF();

signals:
  void fileSize(qint64 size);
  void message(const QString& str);
  void onError(qint32);

public slots:
  void on_connected();
  void displaySocketError(QAbstractSocket::SocketError e);

private:
  QString filePath;

};

#endif // NFCLIENT_H
需要在widget.cpp 实例化一个client 对象,
如下:nfClient *client= new nfClient(this);
每次加上 这句话,就报错 \S60_5th_Edition_SDK_v1.0\epoc32\release\winscw\udeb\MobileClient.exe] Error 1 
去掉后就不报错,请教高手 帮忙解决。。
离线lysong
只看该作者 1楼 发表于: 2010-08-17
回 楼主(lysong) 的帖子
不好意思 我写错了, 是 Client *client= new Client(this);
报错,如下:make[2]: *** [\S60_5th_Edition_SDK_v1.0\epoc32\release\winscw\udeb\MobileClient.exe] Error 1
make[1]: *** [TARGETMOBILECLIENT_0XE77261A2] Error 2 make[1]: Leaving directory `C:/Qt/4.6.3/examples/network/MobileClient'  
C:\S60_5th_Edition_SDK_v1.0\epoc32\tools\make.exe: Leaving directory `C:/Qt/4.6.3/examples/network/MobileClient'  
The process "C:/S60_5th_Edition_SDK_v1.0/epoc32/tools/make.exe" exited normally.
Error while building project MobileClient (target: Symbian Emulator)
When executing build step 'Make'
快速回复
限100 字节
 
上一个 下一个