Did you register std::string with QVariant?
Did you register std::string with QVariant?
Yes, I did that.
Now I have the line QList<QVariant> arguments = spy.takeFirst(); working right.
Following with the code, how can I convert "arguments.at(1)" (if at(1) is a std::string) to std::string?
Using QVariant, the method toString() is returning an empty string, so I cannot use toString().toStdString().
Qt Code:
QVariant var = ...; std::string str = var.value<std::string>();To copy to clipboard, switch view to plain text mode
tarod (14th December 2012)
I've just find the same solution.
Thanks anyway!
Bookmarks