Obsolete Members for Container

The following members of QML type Container are obsolete. They are provided to keep old source code working. We strongly advise against using them in new code.

Methods

Method Documentation

void addItem(Item item)

Adds an item.


void decrementCurrentIndex()

Decrements the current index of the container.

This method can be called to alter the current index without breaking existing currentIndex bindings.

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

See also 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 bindings.

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

See also currentIndex and Managing the Current Index.


void insertItem(int index, Item item)

Inserts an item at index.


Item itemAt(int index)

Returns the item at index, or 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 bindings.

See also currentIndex and Managing the Current Index.


Item takeItem(int index)

Removes and returns the item at index.

Note: The ownership of the item is transferred to the caller.

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


© 2021 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.