Sign up for the KDAB Newsletter
Stay on top of the latest news, publications, events and more.
Go to Sign-up


Find what you need - explore our website and developer resources
31 August 2022
Qt comes with lots of classes relating to strings these days, including QString, QStringView, QStringLiteral etc. It comes with so many that I lost track, so maybe it is time to call my good friend Peppe. In this episode we will discuss what you need to know to get it right at least 95% of the cases, without knowing it all.
Links:
* Detailed documentation on QStringBuilder: https://www.qt.io/blog/2011/06/13/string-concatenation-with-qstringbuilder
0:00 Introduction
1:25 Use QString
2:03 So why do we have all these classes?
2:57 Overview of the classes
3:27 QStringLiteral
5:00 QString::operator==() has improved a lot
8:13 QByteArray
9:50 QLatin1Stringm QLatin1StringView
12:29 Views - QStringRef (Qt5), QStringView
16:18 Lifetime of views
All QML tips and tricks videos : https://www.youtube.com/playlist?list=PL6CJYn40gN6jWHP5krsQrVGyYtKh3A3be
All Qt Widgets and more videos:
https://www.youtube.com/playlist?list=PL6CJYn40gN6gf-G-o6syFwGrtq3kItEqI