About 2,560,000 results
Open links in new tab
  1. c++ - How to change string into QString? - Stack Overflow

    Nov 28, 2009 · If compiled with STL compatibility, QString has a static method to convert a std::string to a QString:

  2. c++ - How to convert QString to std::string? - Stack Overflow

    @eyllanesc the question text says "How to output the content of qstring into the console?" , it seems OP assumes converting to std::string is the only way. It's really two questions being …

  3. substring - Qt. get part of QString - Stack Overflow

    I want to get QString from another QString, when I know necessary indexes. For example: Main string: "This is a string". I want to create new QString from first 5 symbols and get "This ". input …

  4. c++ - How to format a QString? - Stack Overflow

    I'd like to format a string for Qt label, I'm programming in C++ on Qt. In ObjC I would write something like: NSString *format=[NSString stringWithFormat: ... ]; How to do something like …

  5. Whats the best way to send QStrings in a function call?

    Hence this is slower than passing a QString, especially if the QString parameter is much used. I would recommend to always pass a const QString&, and if you need maximum speed on the …

  6. c++ - Qt String Comparison - Stack Overflow

    QString::compare will only return zero if the string passed to it and the string it is called on are equal. Qstring::operator== returns true if the strings are equal otherwise, false.

  7. c++ - How to Compare two Qstrings? - Stack Overflow

    Oct 9, 2013 · Although the question asks how to compare strings, that's not really what it's asking since the question already demonstrates two ways of comparing strings, including the one …

  8. How to print string literal and QString with qDebug?

    Aug 25, 2013 · How to print string literal and QString with qDebug? Asked 12 years, 4 months ago Modified 5 years, 10 months ago Viewed 115k times

  9. c++ - What's the purpose of QString? - Stack Overflow

    Jul 24, 2015 · To stay consistent with this, I've been trying to accept and return QString from most of my function calls, however I find myself converting to and from std::string a lot to use most …

  10. c++ - How to convert int to QString? - Stack Overflow

    Jul 9, 2010 · Is there a QString function which takes an int and outputs it as a QString?