Top "Qstring" questions

A QString is a class in Qt library which implements character strings.

switch/case statement in C++ with a QString type

I want to use switch-case in my program but the compiler gives me this error: switch expression of type 'QString' …

c++ qt switch-statement qt4 qstring
Qt C++ QString to QByteArray Conversion

I have created an encrypt/decrypt program, when encrypting I store the encrypted QByteArray in a text file. When trying …

c++ qt qstring qbytearray
How to deal with "%1" in the argument of QString::arg()?

Everybody loves QString("Put something here %1 and here %2") .arg(replacement1) .arg(replacement2); but things get itchy as soon as you …

qt string-formatting placeholder qstring
QString Splitting

I have these url strings file:///home/we/Pictures/neededWord/3193_n.jpg file:///home/smes/Pictures/neededWord/jds_22.png file:///…

qt qt4 split qstring
Format a Number to a specific QString format

I have a question about formatting a decimal number to a certain QString format. Basically, I have an input box …

c++ qt string-formatting qstring
How to convert a QJsonObject to QString

I have a QJsonObject data and want to convert to QString. How can I do this? Searched for help in …

qt qstring qjsonobject
Convert const char* to QString

I have to use the output of a function of a type const char* and I need to convert it …

c++ qt qstring qtcore const-cast
read QProcess output to string

I have a code that uses QProcess like this. int main(int argc, char *argv[]) { int status=0; QProcess pingProcess; QString …

c++ qt stdout qstring qprocess
Removing whitespaces inside a string

I have a string lots\t of\nwhitespace\r\n which I have simplified but I still need to get …

c++ qt qstring
how to initialize a QString to null?

What is the difference between QString::number(0) and ((const char*) 0)? I want to initialize a QString say phoneNumber to null. …

c++ qstring