yist111 发表于 2007-8-15 09:06:01

QT4 designer小问题请教

在c++ programming with qt4 一书的第二章Shape-Changing Dialogs一节中,有这个例子:



1. Click File|New Form and choose the "Dialog with Buttons Right" template.

2. Create the More button and drag it into the vertical layout, below the vertical spacer. Set the More button's text property to "&More", and its checkable property to "true". Set the OK button's default property to "true".



当第一步建一个"Dialog with Buttons Right"之后,有两个按钮,一个OK,一个Cancel,这两个按钮是一个buttonBox组件,我选择OK按钮就会选择这个buttonBox组件,在第二步要求Set the OK button's default property to "true".的时候我怎样才能单独选择OK按钮进行编辑?

XChinux 发表于 2007-9-11 08:35:18

那就不要用dialogButtonBox

那就不要用dialogButtonBox,用普通的pushButton

hobby! 发表于 2007-11-29 16:33:48

对介面设置,建议,单独分出来编写,意思是,你程序的要完成XXX的事,一系你想好如何做,而中间的数据,用变量(已知)来代替,也可以先做好介面(包括事件融发机制),这两个分开编写,在基本上都写好后,再合并,再修正.....会简单,很多
页: [1]
查看完整版本: QT4 designer小问题请教