![]() |
Home · Examples |
[Previous: Using Layouts in Qt Designer][Qt Designer Manual][Next: Qt Designer's Buddy Editing Mode]
All widgets and layouts on the form can be connected together. However, spacers just provide spacing hints to layouts, so they cannot be connected to other objects.
![]() | Highlighted Objects When the cursor is over an object that can be used in a connection, the object will be highlighted. |
You can abandon the connection at any point while you are dragging the connection path by pressing Esc.
![]() | Making a Connection The connection path will change its shape as the cursor moves around the form. As it passes over objects, they are highlighted, indicating that they can be used in a signal and slot connection. Release the mouse button to make the connection. |
Note: If the Show all signals and slots checkbox is selected, all available signals from the source object will be shown. Otherwise, the signals and slots inherited from QWidget will be hidden.
You can make as many connections as you like between objects on the form; it is possible to connect signals from objects to slots in the form itself. As a result, the signal and slot connections in many dialogs can be completely configured from within Qt Designer.
![]() | Connecting to a Form To connect an object to the form itself, simply position the cursor over the form and release the mouse button. The end point of the connection changes to the electrical "ground" symbol. |
![]() | The Signal/Slot Editor The signal and slot used in a connection can be changed after it has been set up. When a connection is configured, it becomes visible in Qt Designer's signal and slot editor where it can be further edited. You can also edit signal/slot connections by double-clicking on the connection path or one of its labels to display the Connection Dialog. |
![]() | Deleting Connections The whole connection can be selected by clicking on any of its path segments. Once selected, a connection can be deleted with the Delete key, ensuring that it will not be set up in the .ui file. |
Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies) | Trademarks | Qt Jambi 4.5.2_01 |