C ++ Gui Programming with QT3 (series four trials)

xiaoxiao2021-03-06  36

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) does not emit any signal, since the spin box value is Already 35. This Prevents In Fi Nite Recursion. 20 line sets the value of Spin Box to 35, then QspinBox object issued a ValueChanged message with a value of 35. This parameter will pass to the QSlider's setValue (slot), and he sets the value of the Slider object to 35. Then the SLIDER object also issues a valuechanged message

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 cleft and positioning.used by connect'ssignals and slots machines show QHBOX and his two sub-form controls. Qt tends to establish an easy-to-understand and flexible user interface. The most common working mode of the Qt programmer is to instantiate some controls and then set his necessary properties. Add the control to the Layouts (for the size and location of the automatic management control). Manage interface behavior with QT messages and message slots.

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. The reference document using the reference document QT is the basic tool for each QT programmer. Because she covers all classes and all methods in QT (400 classes and more than 6,000 methods in Qt 3.2). This book uses a lot of Qt classes and methods, but it does not mention all of them. It is not possible to provide all details in the classes and methods mentioned. So I want to get the biggest benefit in QT, you will be familiar with QT reference documentation. In the doc / html directory of Qt you can find the HTML version of the Qt reference document, you can read any browser. You can also use Qt Assistant, Qt your own help browser. His strong search and index feature, you can open Qt Assisant by clicking on Windows Start menu Qt / 3.2.x / qt assistant (translation). Type Assistant in the command line in the UNIX system. Double-click Assistant in Mac OSX.

转载请注明原文地址:https://www.9cbs.com/read-63971.html

New Post(0)