C++ GUI Programming with Qt3(系列四 试翻)
来源:互联网 发布:ajax跨域 java 编辑:程序博客网 时间:2024/05/17 17:59
Line 20 sets the spin box value to 35. When this happens, the QSpinBox emits the valueChanged(int) signal with an int argument of 35. This argument is passed to the QSlider’s setValue(int) slot,which sets the slider value to 35.The slider then emits the valueChanged(int) signal, because its own value changed, triggering the spin box’s setValue(int) slot. But at this point, setValue(int) doesn’t emit any signal, since the spin box value is already 35. This prevents infinite recursion. Figure 1.6 summarizes the situation. | 第20行把spin box 的值设为35,接着QSpinBox 对象就发出了一个valueChanged(int)的消息,该消息带的值为35。这个参数将传递到QSlider的setValue(int)这个消息槽中(slot),他把slider对象的值设置为35。然后Slider对象也发出一个valueChanged(int)消息 |
Line 22 shows the QHBox and its two child widgets. Qt’s approach to building user interfaces is simple to understand and very flexible. The most common pattern that Qt programmers use is toinstantiate the required widgetsand then set their propertiesas necessary. Programmers add the widgets to layouts, which automatically take care of sizing and positioning.User interface behavior is managed by connecting widgets together using Qt’ssignals and slots mechanism.
| 第22行显示QHBox和他的两个子窗体控件。Qt的趋向于建立易于理解而且灵活的用户界面。Qt程序员的最通常的工作模式就是实例化一些控件,然后设置他的必要的属性。把控件加入到layouts(用于自动管理控件的大小和位置)上。用Qt的消息和消息槽机制来管理界面行为。 |
Using the Reference Documentation
|
- C++ GUI Programming with Qt3(系列四 试翻)
- C++ GUI Programming with Qt3(系列一 试翻)
- C++ GUI Programming with Qt3(系列二 试翻)
- C++ GUI Programming with Qt3(系列三 试翻)
- GUI programming with PyGTK
- Programming with Objective-C(四)
- 《C++.GUI.Programming.with.Qt.4》读书笔记Chapter 1~2
- 《C++.GUI.Programming.with.Qt.4》读书笔记Chapter 3
- 《C++.GUI.Programming.with.Qt.4》读书笔记Chapter 4~5
- 《C++.GUI.Programming.with.Qt.4》读书笔记Chapter 6~7
- 《C++.GUI.Programming.with.Qt.4》读书笔记Chapter 9~10
- 《C++.GUI.Programming.with.Qt.4》读书笔记Chapter 11~12
- 《C++.GUI.Programming.with.Qt.4》读书笔记Chapter 13~15
- 《C++.GUI.Programming.with.Qt.4》读书笔记Chapter 16~18
- 《C++.GUI.Programming.with.Qt.4》读书笔记Chapter 19~20
- 读书摘要--《C++.GUI.Programming.with.Qt.4》chapter1~2
- 《C++.GUI.Programming.with.Qt.4》读书笔记Chapter 3
- 读书摘要--《C++.GUI.Programming.with.Qt.4》chapter4~10
- 三种平滑滤波器的比较(均值,中值和带方向特性的边沿保持)
- AppFuse 第一天
- 郎咸平——“担保圈”最终要损害银行和小股民
- 字符串小结--菜鸟文章,老鸟多多指点!
- 简单工厂模式(Simple Factory)
- C++ GUI Programming with Qt3(系列四 试翻)
- C语言经典问题集
- 给c++程序员的一份礼物——常用工具集
- 谈我对攻读计算机研究生的看法(转)
- 走向J2EE,漫长的道路
- Symbian OS下的类命名约定—基本类型
- 梦境
- 我们骨子里仍然相信自己会走出阴霾-
- 经典入门教程:JSP标准模板库(转)