Widget Tools Examples

Qt provides the functionality for autocomplete, Undo/Redo actions, and regular expressions for the Widget-based applications.

Completer Example

The Completer example shows how to provide string-completion facilities for an input widget based on data provided by a model.

Custom Completer Example

The Custom Completer example shows how to provide string-completion facilities for an input widget based on data provided by a model. The completer pops up suggestions for possible words based on the first three characters input by the user and the user's choice of word is inserted into the TextEdit using QTextCursor.

QRegularExpression Example

The QRegularExpression example shows how regular expressions in Qt are applied to text by providing an environment in which new regular expressions can be created and tested on custom text strings.

Tree Model Completer Example

The Tree Model Completer example shows how to provide completion facilities for a hierarchical model, using a period as the separator to access Child, GrandChild and GrandGrandChild level objects.

Undo Framework Example

This example shows how to implement undo/redo functionality with the Qt undo framework.

© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.