Qt Designer's Buddy Editing ModeOne of the most useful basic features of Qt is the support for buddy widgets. A buddy widget accepts the input focus on behalf of a QLabel when the user types the label's shortcut key combination. The buddy concept is also used in Qt's model/view framework. Linking Labels to Buddy WidgetsTo enter buddy editing mode, open the Edit menu and select Edit Buddies. This mode presents the widgets on the form in a similar way to signals and slots editing mode but in this mode, connections must start at label widgets. Ideally, you should connect each label widget that provides a shortcut with a suitable input widget, such as a QLineEdit.
Removing Buddy ConnectionsOnly one buddy widget can be defined for each label. To change the buddy used, it is necessary to delete any existing buddy connection before you create a new one. Connections between labels and their buddy widgets can be deleted in the same way as signal-slot connections in signals and slots editing mode: Select the buddy connection by clicking on it and press the Delete key. This operation does not modify either the label or its buddy in any way. [Previous: Qt Designer's Signals and Slots Editing Mode] [Next: Qt Designer's Tab Order Editing Mode] © 2008-2011 Nokia Corporation and/or its subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide. All other trademarks are property of their respective owners. Privacy Policy Licensees holding valid Qt Commercial licenses may use this document in accordance with the Qt Commercial License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Nokia. Alternatively, this document may be used under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. |