summaryrefslogtreecommitdiffstats
path: root/examples/widgets/graphicsview/flowlayout
diff options
context:
space:
mode:
authorJarek Kobus <jaroslaw.kobus@qt.io>2020-06-22 10:12:38 +0200
committerJarek Kobus <jaroslaw.kobus@qt.io>2020-06-23 14:01:11 +0200
commit29c99bddbf48f97b054a34354f55b36a3f84a62c (patch)
treeca0116c45cc3cb04e13a953316f468012d3dc2d2 /examples/widgets/graphicsview/flowlayout
parentd7efb2a419a88c8f512b98194c8f7bc81dbe942b (diff)
Use QList instead of QVector in examples
Task-number: QTBUG-84469 Change-Id: Id14119168bb1bf11f99bda7ef6ee9cf51bcfab2e Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Diffstat (limited to 'examples/widgets/graphicsview/flowlayout')
-rw-r--r--examples/widgets/graphicsview/flowlayout/flowlayout.h2
-rw-r--r--examples/widgets/graphicsview/flowlayout/window.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/examples/widgets/graphicsview/flowlayout/flowlayout.h b/examples/widgets/graphicsview/flowlayout/flowlayout.h
index c6758414d6..14251072ec 100644
--- a/examples/widgets/graphicsview/flowlayout/flowlayout.h
+++ b/examples/widgets/graphicsview/flowlayout/flowlayout.h
@@ -75,7 +75,7 @@ private:
QSizeF prefSize() const;
QSizeF maxSize() const;
- QVector<QGraphicsLayoutItem*> m_items;
+ QList<QGraphicsLayoutItem *> m_items;
qreal m_spacing[2] = {6, 6};
};
diff --git a/examples/widgets/graphicsview/flowlayout/window.cpp b/examples/widgets/graphicsview/flowlayout/window.cpp
index 0edaa686b4..dd4e3661da 100644
--- a/examples/widgets/graphicsview/flowlayout/window.cpp
+++ b/examples/widgets/graphicsview/flowlayout/window.cpp
@@ -59,7 +59,7 @@ Window::Window(QGraphicsItem *parent) : QGraphicsWidget(parent, Qt::Window)
FlowLayout *lay = new FlowLayout;
const QString sentence(QLatin1String("I am not bothered by the fact that I am unknown."
" I am bothered when I do not know others. (Confucius)"));
- const QVector<QStringRef> words = sentence.splitRef(QLatin1Char(' '), Qt::SkipEmptyParts);
+ const QList<QStringRef> words = sentence.splitRef(QLatin1Char(' '), Qt::SkipEmptyParts);
for (const QStringRef &word : words) {
QGraphicsProxyWidget *proxy = new QGraphicsProxyWidget(this);
QLabel *label = new QLabel(word.toString());