diff options
Diffstat (limited to 'src/widgets/doc')
-rw-r--r-- | src/widgets/doc/snippets/code/doc_src_layout.cpp | 10 | ||||
-rw-r--r-- | src/widgets/doc/src/widgets-and-layouts/layout.qdoc | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/widgets/doc/snippets/code/doc_src_layout.cpp b/src/widgets/doc/snippets/code/doc_src_layout.cpp index 7bbd781bb2..3cf5ffbef4 100644 --- a/src/widgets/doc/snippets/code/doc_src_layout.cpp +++ b/src/widgets/doc/snippets/code/doc_src_layout.cpp @@ -53,7 +53,7 @@ #define CARD_H #include <QtWidgets> -#include <QVector> +#include <QList> class CardLayout : public QLayout { @@ -73,7 +73,7 @@ public: void setGeometry(const QRect &rect) override; private: - QVector<QLayoutItem*> m_items; + QList<QLayoutItem *> m_items; }; #endif //! [0] @@ -86,7 +86,7 @@ private: //! [2] int CardLayout::count() const { - // QVector::size() returns the number of QLayoutItems in m_items + // QList::size() returns the number of QLayoutItems in m_items return m_items.size(); } //! [2] @@ -94,14 +94,14 @@ int CardLayout::count() const //! [3] QLayoutItem *CardLayout::itemAt(int idx) const { - // QVector::value() performs index checking, and returns nullptr if we are + // QList::value() performs index checking, and returns nullptr if we are // outside the valid range return m_items.value(idx); } QLayoutItem *CardLayout::takeAt(int idx) { - // QVector::take does not do index checking + // QList::take does not do index checking return idx >= 0 && idx < m_items.size() ? m_items.takeAt(idx) : 0; } //! [3] diff --git a/src/widgets/doc/src/widgets-and-layouts/layout.qdoc b/src/widgets/doc/src/widgets-and-layouts/layout.qdoc index 24f8cd836f..c72c3e8c68 100644 --- a/src/widgets/doc/src/widgets-and-layouts/layout.qdoc +++ b/src/widgets/doc/src/widgets-and-layouts/layout.qdoc @@ -299,7 +299,7 @@ \list \li A data structure to store the items handled by the layout. Each item is a \l{QLayoutItem}{QLayoutItem}. We will use a - QVector in this example. + QList in this example. \li \l{QLayout::}{addItem()}, how to add items to the layout. \li \l{QLayout::}{setGeometry()}, how to perform the layout. \li \l{QLayout::}{sizeHint()}, the preferred size of the layout. |