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

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

The ListWidget class provides an abstract base class for all test widgets which display a list of items to the user. More...

This class is under development and is subject to change.

Public Functions


Detailed Description

The ListWidget class provides an abstract base class for all test widgets which display a list of items to the user.

QtUiTest::ListWidget allows a widget which is conceptually a list to be enumerated. This is closely related to QtUiTest::SelectWidget, which may be implemented to allow a user to select an item from a list.

Examples of widgets suitable for this interface include QAbstractItemView, QComboBox and QMenu.

See also QtUiTest::SelectWidget.


Member Function Documentation

bool ListWidget::ensureVisible ( const QString & item )   [virtual]

Simulates the user input necessary to navigate this widget until item is currently visible and return true on success.

For example, in a QAbstractItemView with vertical scrollbars, if item exists further down the list than currently shown, this function might simulate 'Down' key clicks until it becomes visible.

The base implementation does nothing and returns true.

QStringList ListWidget::list () const   [pure virtual]

Returns a list containing a text representation of each item in this list widget.

QRect ListWidget::visualRect ( const QString & item ) const   [pure virtual]

Returns the bounding rect of item, in widget coordinates. If item isn't currently shown in this widget, returns a null rect.

See also QAbstractItemView::visualRect().


Copyright © 2009 Trolltech Trademarks
Qt Extended 4.4.3