diff options
Diffstat (limited to 'doc/src/snippets/code')
-rw-r--r-- | doc/src/snippets/code/doc_src_layout.qdoc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/doc/src/snippets/code/doc_src_layout.qdoc b/doc/src/snippets/code/doc_src_layout.qdoc index fedcf0c..60f36b0 100644 --- a/doc/src/snippets/code/doc_src_layout.qdoc +++ b/doc/src/snippets/code/doc_src_layout.qdoc @@ -67,7 +67,9 @@ void CardLayout::addItem(QLayoutItem *item) //! [5] CardLayout::~CardLayout() { - deleteAllItems(); + QLayoutItem *item; + while ((item = takeAt(0))) + delete item; } //! [5] @@ -121,4 +123,4 @@ QSize CardLayout::minimumSize() const } return s + n*QSize(spacing(), spacing()); } -//! [7]
\ No newline at end of file +//! [7] |