promotion image of download ymail app

How to convert from a QTString type to String type in C++ .......... please help me?

i have a file name stored in a varible of type qtstring and i need to move it into a variable of type string.... but i don't know how .... can you help me pleeeeeeeeeeeez.

1 Answer

  • 1 decade ago
    Favorite Answer

    #include <QString>

    #include <string>

    using namespace std;

    const std::string & qt2string(

    std::string & dest, const qtstring & src )


    dest = (const char*);

    return dest;


    • Commenter avatarLogin to reply the answers
Still have questions? Get your answers by asking now.