Obsolete Members for Container

The following members of QML type Container 已過時。 提供它們是為使舊源代碼能繼續工作。強烈建議不要在新代碼中使用它們。

方法

方法文檔編製

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).