When building and executing the following code:
#include <QString>
#include <iostream>
int main()
{
std::cout << someString.toStdString();
return 0;
}
#include <QString>
#include <iostream>
int main()
{
QString someString = QString("1%").arg("Hello World!");
std::cout << someString.toStdString();
return 0;
}
To copy to clipboard, switch view to plain text mode
I get this output:
QString::arg: Argument missing
: 1%, Hello World
! 1%
QString::arg: Argument missing: 1%, Hello World!
1%
To copy to clipboard, switch view to plain text mode
which includes the error message "QString::arg: Argument missing", why am I getting this??
Thanks in advance.
Bookmarks