这是我的代码,但它给了我错误“'qnetworkreply'尚未宣布”。任何人都可以告诉它为何如此
#ifndef ApplicationUI_HPP_
#define ApplicationUI_HPP_
#include <QObject>
namespace bb { namespace cascades { class Application; }}
class ApplicationUI : public QObject
{
Q_OBJECT
public:
ApplicationUI(bb::cascades::Application *app);
virtual ~ApplicationUI() {}
public slots:
void onResult(QNetworkReply*);
};
#endif
答案 0 :(得分:1)
您是否在.pro文件中添加了QT += network
?