Skip to content
tpyssysa edited this page Feb 28, 2018 · 35 revisions

QString, QStringLiteral, Value Types

Comment: Maybe this could be more general as well: String handling and value types

Explanation of the contents of a topic page @ Week 1 Topic 1

Back to Week 1

Objective: Basic String manipulation

Comment: There is no String type in Qt, so should be written on lower-case

Comment: This is a huge topic and I'd try to avoid losing attendees' interest at the beginning. The minimum: QString + QChar + QCodec, creating, concatenation + light-weight use with QLatin1String or QStringView (the latter can be omitted). String literals could be already another topic. And QByteArray is relevant in cases, where coding is not needed. I'm afraid this is too much for one section, isn't it.

Beginner

Intermediate

  • What is QString?

Comment: * QString or QByteArray?

  • How does std::string/c string compare to QString?
  • What is QStringLiteral?

Comment: * How to compare and manipulate strings efficiently? QLatin1String, QStringRef, QStringView

  • What are value types in Qt?

Expert

Clone this wiki locally