分享
 
 
 

C++ GUI Programming with Qt3(系列四 试翻)

王朝c/c++·作者佚名  2006-01-09
窄屏简体版  字體: |||超大  

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 in?nite 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

Using the Reference Documentation

Qt's reference documentation is an essential tool for any Qt developer,since it covers every class and function in Qt.(Qt 3.2 include over 400 public classes and over 6000 functions.) This book makes use of many Qt classes and functions,but it doesn't mention them all, nor does it provide all the details of those it does mention. To get the most benefit from Qt, you should familiarize yourself with the Qt reference documentation.

The documentation is available in HTML format in Qt’s doc\html directory and can be read using any web browser. You can also use Qt Assistant,the Qt help browser, whose powerful search and indexing features make it quicker and easier to use than a web browser. To launch Qt Assistant, click Qt 3.2.x|Qt Assistant in the Start menu on Windows, type assistant on the command line on Unix, or double-click assistant in the Mac OS X Finder.

使用参考文档

Qt 的参考文档是每个Qt程序员的基本工具。因为她覆盖了Qt中所有的类和所有的方法(Qt 3.2 中有400多个类和6000多个方法)。本书使用了很多Qt的类和方法,但是并没有提及他们中的所有。就是提到的类和方法中也没有能够提供所有细节。所以要想在Qt中获得最大的利益,你就的去熟悉Qt的参考文档。

在Qt的doc\html目录下你可以找到Qt参考文档的Html版,你可以使用任何浏览器阅读。你也可以使用Qt Assistant,Qt自己的帮助浏览器。他又强大的搜索和索引功能,你可以通过点击windows的开始菜单 Qt\3.2.X\Qt assistant(译:可以直接点击assistant.exe程序来启动) 来打开Qt Assisant。 在unix系统在命令行中敲入assistant。在Mac OSX 双击assistant。

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
2023年上半年GDP全球前十五强
 百态   2023-10-24
美众议院议长启动对拜登的弹劾调查
 百态   2023-09-13
上海、济南、武汉等多地出现不明坠落物
 探索   2023-09-06
印度或要将国名改为“巴拉特”
 百态   2023-09-06
男子为女友送行,买票不登机被捕
 百态   2023-08-20
手机地震预警功能怎么开?
 干货   2023-08-06
女子4年卖2套房花700多万做美容:不但没变美脸,面部还出现变形
 百态   2023-08-04
住户一楼被水淹 还冲来8头猪
 百态   2023-07-31
女子体内爬出大量瓜子状活虫
 百态   2023-07-25
地球连续35年收到神秘规律性信号,网友:不要回答!
 探索   2023-07-21
全球镓价格本周大涨27%
 探索   2023-07-09
钱都流向了那些不缺钱的人,苦都留给了能吃苦的人
 探索   2023-07-02
倩女手游刀客魅者强控制(强混乱强眩晕强睡眠)和对应控制抗性的关系
 百态   2020-08-20
美国5月9日最新疫情:美国确诊人数突破131万
 百态   2020-05-09
荷兰政府宣布将集体辞职
 干货   2020-04-30
倩女幽魂手游师徒任务情义春秋猜成语答案逍遥观:鹏程万里
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案神机营:射石饮羽
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案昆仑山:拔刀相助
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案天工阁:鬼斧神工
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案丝路古道:单枪匹马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:与虎谋皮
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:李代桃僵
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:指鹿为马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:小鸟依人
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:千金买邻
 干货   2019-11-12
 
推荐阅读
 
 
 
>>返回首頁<<
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有