diff options
Diffstat (limited to 'examples/widgets/graphicsview')
-rw-r--r-- | examples/widgets/graphicsview/flowlayout/window.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/widgets/graphicsview/flowlayout/window.cpp b/examples/widgets/graphicsview/flowlayout/window.cpp index dd4e3661da..d0dee2081c 100644 --- a/examples/widgets/graphicsview/flowlayout/window.cpp +++ b/examples/widgets/graphicsview/flowlayout/window.cpp @@ -59,8 +59,8 @@ 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 QList<QStringRef> words = sentence.splitRef(QLatin1Char(' '), Qt::SkipEmptyParts); - for (const QStringRef &word : words) { + const QList<QStringView> words = QStringView{ sentence }.split(QLatin1Char(' '), Qt::SkipEmptyParts); + for (const QStringView &word : words) { QGraphicsProxyWidget *proxy = new QGraphicsProxyWidget(this); QLabel *label = new QLabel(word.toString()); label->setFrameStyle(QFrame::Box | QFrame::Plain); |