Obsolete Members for Container

The following members of QML type 容器 已过时。 提供它们是为使旧源代码能继续工作。强烈建议不要在新代码中使用它们。

方法

方法文档编制

void addItem ( Item item )

添加 item .

void decrementCurrentIndex ()

Decrements the current index of the container.

This method can be called to alter the current index without breaking existing currentIndex 绑定。

This method was introduced in QtQuick.Controls 2.1 (Qt 5.8).

另请参阅 currentIndex and Managing the Current Index .

void incrementCurrentIndex ()

Increments the current index of the container.

This method can be called to alter the current index without breaking existing currentIndex 绑定。

This method was introduced in QtQuick.Controls 2.1 (Qt 5.8).

另请参阅 currentIndex and Managing the Current Index .

void insertItem ( int index , Item item )

Inserts an item at index .

Item itemAt ( int index )

返回项在 index ,或 null if it does not exist.

void moveItem ( int from , int to )

Moves an item from one index to another.

void removeItem ( Item item )

Removes and destroys the specified item .

This method was introduced in QtQuick.Controls 2.3 (Qt 5.10).

void setCurrentIndex ( int index )

Sets the current index of the container.

This method can be called to set a specific current index without breaking existing currentIndex 绑定。

另请参阅 currentIndex and Managing the Current Index .

Item takeItem ( int index )

Removes and returns the item at index .

注意: The ownership of the item is transferred to the caller.

This method was introduced in QtQuick.Controls 2.3 (Qt 5.10).