• PySide 模块
  • PySide.QtWebKit
  • 内容表

    上一话题

    QWebHitTestResult

    下一话题

    QWebElement

    QWebElementCollection

    注意

    该类在 Qt4.6 引入

    概要

    函数

    详细描述

    PySide.QtWebKit.QWebElementCollection class represents a collection of web elements.

    Elements in a document can be selected using QWebElement.findAll() or using the PySide.QtWebKit.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 PySide.QtWebKit.QWebElementCollection.count() property. Individual elements can be retrieved by index using PySide.QtWebKit.QWebElementCollection.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) {
        ...
    }
    									
    class PySide.QtWebKit. QWebElementCollection
    class PySide.QtWebKit. QWebElementCollection ( contextElement , query )
    class PySide.QtWebKit. QWebElementCollection ( arg__1 )
    参数:

    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 .

    PySide.QtWebKit.QWebElementCollection. __getitem__ ( )
    PySide.QtWebKit.QWebElementCollection. __len__ ( )
    PySide.QtWebKit.QWebElementCollection. append ( collection )
    参数: collection PySide.QtWebKit.QWebElementCollection

    Extends the collection by appending all items of other .

    The resulting collection may include duplicate elements.

    另请参阅

    PySide.QtWebKit.QWebElementCollection.operator+=()

    PySide.QtWebKit.QWebElementCollection. at ( i )
    参数: i PySide.QtCore.int
    返回类型: PySide.QtWebKit.QWebElement

    Returns the element at index position i in the collection.

    PySide.QtWebKit.QWebElementCollection. count ( )
    返回类型: PySide.QtCore.int

    返回集合中的元素数。

    PySide.QtWebKit.QWebElementCollection. first ( )
    返回类型: PySide.QtWebKit.QWebElement

    Returns the first element in the collection.

    PySide.QtWebKit.QWebElementCollection. last ( )
    返回类型: PySide.QtWebKit.QWebElement

    Returns the last element in the collection.

    PySide.QtWebKit.QWebElementCollection. __add__ ( other )
    参数: other PySide.QtWebKit.QWebElementCollection
    返回类型: PySide.QtWebKit.QWebElementCollection

    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.

    另请参阅

    PySide.QtWebKit.QWebElementCollection.operator+=()

    PySide.QtWebKit.QWebElementCollection. __iadd__ ( other )
    参数: other PySide.QtWebKit.QWebElementCollection
    返回类型: PySide.QtWebKit.QWebElementCollection

    Appends the items of the other list to this list and returns a reference to this list.

    另请参阅

    PySide.QtWebKit.QWebElementCollection.operator+() PySide.QtWebKit.QWebElementCollection.append()

    PySide.QtWebKit.QWebElementCollection.operator[](i)
    参数: i PySide.QtCore.int
    返回类型: PySide.QtWebKit.QWebElement

    Returns the element at the specified position in the collection.

    PySide.QtWebKit.QWebElementCollection. toList ( )
    返回类型:

    返回 QList object with the elements contained in this collection.