• 4708阅读
  • 2回复

[提问]求指教 [复制链接]

上一主题 下一主题
离线ji_xiang
 

只看楼主 倒序阅读 楼主  发表于: 2012-05-06
— 本帖被 XChinux 从 C/C++基础 移动到本区(2012-05-21) —
C++ GUI Qt4
编程 (第二版)中的2.3快速设计对话框实例,我的代码和书上一样,为什么会出现如下错误,本人新手,请大家多多指教,谢谢!


D:\gotocell\gotocelldialog.h:7: 错误:expected class-name before '{' token
D:\gotocell\gotocelldialog.cpp:-1: In constructor 'GoToCellDialog::GoToCellDialog(QWidget*)':
D:\gotocell\gotocelldialog.cpp:8: 错误:'setupUi' was not declared in this scope
D:\gotocell\gotocelldialog.cpp:11: 错误:'lineEdit' was not declared in this scope
D:\gotocell\gotocelldialog.cpp:13: 错误:'okButton' was not declared in this scope
D:\gotocell\gotocelldialog.cpp:14: 错误:'cancelButton' was not declared in this scope
D:\gotocell\gotocelldialog.cpp:-1: In member function 'void GoToCellDialog::on_lineEdit_textChanged()':
D:\gotocell\gotocelldialog.cpp:19: 错误:'okButton' was not declared in this scope
D:\gotocell\gotocelldialog.cpp:19: 错误:'lineEdit' was not declared in this scope
离线XChinux

只看该作者 1楼 发表于: 2012-05-21
把代码帖上来看看
二笔 openSUSE Vim N9 BB10 XChinux@163.com 网易博客 腾讯微博
承接C++/Qt、Qt UI界面、PHP及预算报销系统开发业务
离线zacharychau

只看该作者 2楼 发表于: 2012-08-10
回 楼主(ji_xiang) 的帖子
你控件拖错类型了...在新建from的时候选择 Widget...
快速回复
限100 字节
 
上一个 下一个