最近尝试改写编译qtopia上的小例子,想用QInputDialog生成个弹出对话框输入字符串,参考qt2的文档,也照着例子改写添加到按钮响应函数中,类似如下:
bool ok;
QString fileName = QInputDialog::getText(tr("Put File:"),
tr("Please input file name:"), QLineEdit::Normal, QString(), &ok,this);
if(ok && !fileName.isEmpty())
{
.....
}
在头文件中也添加了qinputdialog.h,但就是编译的时候老是提示说"QInputDialog" 是Incomplete的,也不是参数错误或者没声明,搞得很郁闷,望大大帮忙解决,非常感谢!!
qt2的库应该没问题,qt2库文件中是有QInputDialog.h QInputDialog.cpp的,编译其他小程序都是可以的,后来尝试用qt4编写QInputDialog没有这种问题。望指点!!
