您的位置:首页 > 其它

error: forward declaration of 'class QLabel'

2014-02-21 11:41 351 查看
../untitled/finddialog.cpp: In constructor 'FindDialog::FindDialog(QWidget*)':
../untitled/finddialog.cpp:7:45: error: invalid use of incomplete type 'class QLabel'
label = new QLabel(tr("Find &what:"));
^
In file included from ../untitled/finddialog.cpp:2:0:
../untitled/finddialog.h:6:7: error: forward declaration of 'class QLabel'
class QLabel;
^

#include<QtGui>改成
#inlcude<QtWidgets>

Qt官网wiki有说明:http://qt-project.org/wiki/Transition_from_Qt_4.x_to_Qt5
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  新手