The QWebElementCollection class represents a collection of web 元素。 更多...
The QWebElementCollection class represents a collection of web 元素。
Elements in a document can be selected using QWebElement.findAll () or using the QWebElement constructor. The collection is composed by choosing all elements in the document that match a specified CSS selector expression.
The number of selected elements is provided through the count () property. Individual elements can be retrieved by index using at ().
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) { ... }
Constructs an empty collection.
Constructs a collection of elements from the list of child elements of contextElement that match the specified CSS selector query .
构造副本为 other .
Extends the collection by appending all items of other .
The resulting collection may include duplicate elements.
另请参阅 operator+= ().
Returns the element at index position i 在 collection.
返回集合中的元素数。
Returns the first element in the collection.
另请参阅 last (), operator[] (), at (),和 count ().
Returns the last element in the collection.
另请参阅 first (), operator[] (), at (),和 count ().
返回 QList object with the elements contained in this collection.