标题:【提问】dialog的制作
作者:interknight
日期:2005-11-15 19:58
内容:
制作过程:
1.在WINDOWS/XP 下安装QT3.0
2.在QT DESIGNER中制作如图:


其中OKButton的enable属性为faulse,default属性为true
窗体form的name property - GoToCellDialog,caption property - Go to cell
spacer的orientation property- horizontal
spacer的用途???
3.click Tools|set buddy,drag textlabel to lineEdit
set buddy是干什麽的
4.lay out ,edit|connection.
5.双击背景,添加如下代码:
void GoToCellDialog::enableOKButton()
{
OKButton->setEnabled(lineEdit->hasAcceptableInput());
}
6.save
7.写main 函数:
我是在打开VC,在VC中写的,内容如下:

#include
#include "gotocelldialog.h"
int main(int argc,char *argv[])
{
QApplication app(argc,argv);
GoToCellDialog *dialog=new GoToCellDialog;
app.setMainWidget(dialog);
dialog->show();
return app.exec();
}
[question3]如果在FORM窗体属性中的NAME没有改成GoToCellDialog,而是默认的FORM,那麽在MAIN函数中,如何修改?