#include <mw/QtWebKit/qwebelement.h>
| class QWebElementCollection |
The QWebElementCollection class represents a collection of web elements. .
| Public Member Functions | |
|---|---|
| QWebElementCollection() | |
| QWebElementCollection(const QWebElement &, const QString &) | |
| QWebElementCollection(const QWebElementCollection &) | |
| ~QWebElementCollection() | |
| void | append(const QWebElementCollection &) |
| QWebElement | at(int) |
| const_iterator | begin() |
| iterator | begin() |
| const_iterator | constBegin() |
| const_iterator | constEnd() |
| int | count() |
| const_iterator | end() |
| iterator | end() |
| QWebElement | first() |
| QWebElement | last() |
| QWebElementCollection | operator+(const QWebElementCollection &) |
| QWebElementCollection & | operator+=(const QWebElementCollection &) |
| QWebElementCollection & | operator=(const QWebElementCollection &) |
| QWebElement | operator[](int) |
| QList< QWebElement > | toList() |
It is also possible to iterate through all elements in the collection using Qt's foreach macro:
QWebElementCollection collection = document.findAll("p");
foreach (QWebElement paraElement, collection) {
...
}
| QWebElementCollection | ( | const QWebElement & | contextElement, |
| const QString & | query | ||
| ) | |||
Constructs a collection of elements from the list of child elements of contextElement that match the specified CSS selector query.
| void | append | ( | const QWebElementCollection & | collection | ) |
Extends the collection by appending all items of other.
The resulting collection may include duplicate elements.
See also: operator+=()
| const_iterator | constEnd | ( | ) | const [inline] |
Returns an STL-style iterator pointing to the imaginary element after the last element in the list.
See also: begin()
| const_iterator | end | ( | ) | const [inline] |
Returns an STL-style iterator pointing to the imaginary element after the last element in the list.
See also: begin()
| QWebElementCollection | operator+ | ( | const QWebElementCollection & | other | ) | const |
Returns a collection that contains all the elements of this collection followed by all the elements in the other collection. Duplicates may occur in the result.
See also: operator+=()
| QWebElementCollection & | operator+= | ( | const QWebElementCollection & | other | ) | [inline] |
Appends the items of the other list to this list and returns a reference to this list.
See also: operator+(), append()
| QWebElementCollection & | operator= | ( | const QWebElementCollection & | ) |
Assigns other to this collection and returns a reference to this collection.
| QWebElement | operator[] | ( | int | i | ) | const [inline] |
Returns the element at the specified position in the collection.
| QList< QWebElement > | toList | ( | ) | const |
Returns a QList object with the elements contained in this collection.