Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions codeless banner

TextWidget Class Reference
(QtUiTest::TextWidget)
[QtUiTestModule]

The TextWidget class provides an abstract base class for all test widgets which display text to the user. More...

    #include <QtUiTest>

This class is under development and is subject to change.

Public Functions


Detailed Description

The TextWidget class provides an abstract base class for all test widgets which display text to the user.

The QtUiTest::TextWidget interface should be implemented on any widget which shows any text at all. This is the primary interface QtUiTest uses to determine text->widget mappings, and it is used to implement getText(), a heavily used verification mechanism.

This interface is closely related to QtUiTest::InputWidget, which provides an interface for entering text into a widget. Any widgets which contain user-editable text will typically implement both QtUiTest::InputWidget and QtUiTest::TextWidget.

Examples of widgets suitable for this interface include QLabel, QAbstractButton, QLineEdit, QTextEdit and many more.

See also QtUiTest::InputWidget.


Member Function Documentation

QString TextWidget::selectedText () const   [virtual]

Returns the text in this widget which is currently selected / highlighted. If the widget does not support the concept of selected text, this function should return the same as text().

The base implementation calls text().

See also QLineEdit::selectedText().

QString TextWidget::text () const   [pure virtual]

Returns all of the text this widget is currently presenting to the user.


Copyright © 2009 Nokia Trademarks
Qt Extended 4.4.3