Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to write a QString on several lines?

Tags:

c++

qt

qstring

Do you have a better way to do that ?

QString str("I am a long long long"
              + QString("long long long")
              + QString("long QString") );

I don't like all this QString.

like image 811
canardman Avatar asked Nov 25 '10 10:11

canardman


1 Answers

In C++ string literals are automatically concatenated when placed next to each other.

QString str("I am a long long long"
    "long long long"
    "long QString");
like image 97
robert Avatar answered Sep 22 '22 06:09

robert