[Development] Wither QString?

Henry Skoglund henry at tungware.se
Fri Oct 18 02:28:34 CEST 2019

Hi, while writing lots of QString string fiddling code (keyboard macro 
utility) I feel something tugging at my sleeve:
the upcoming C++20, looking at std::format(), it seems really handy, e.g.:

std::string s = std::format("String '{}' has {} characters\n", string, 

// for a German flavor you can use arg #
std::string s = std::format("{1} Zeichen lang ist die Zeichenkette 
'{0}'\n", string, string.length());

// lots of formatting options with a ':'|inside the curlies
||std::string s = std::format("{0:b} {0:d} {0:x}", 42);   // s == 
"101010 42 2a"|
Using QString::arg() works fine but it's getting harder to ignore all 
the new C++ stuff and C++20 looks to be one of the bigger additions to 
the language since C++11.

Perhaps the time has come to think about a retirement plan for QString?

Rgrds Henry

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20191018/724bf031/attachment-0001.html>

More information about the Development mailing list