C++ GUI Programming with Qt 4, Second Edition
Chapter 2
Subclassing QDialog
构建一个Find对话框
头文件:
包含<QDialog>,QT中有关dialog的基础类都包含在其中,这个头文件源自QWidget
不包含QtGui,而是将所需的类前置声明
定义FindDialog类,该类继承于QDialog.
其中有:
public 构造函数
signal 信号函数:FindPrvious and FindNext
private slot 槽函数:EnableFindButton and FindWhenClicked
private: 成员对象变量的指针
.cpp成员函数实现文件
构造函数实现:
1.成员变量的初始化
2.connect function
3.layout management
4.setWindow
slot 函数实现: