I want to achieve the same effect as
std::string s = "abc";
s[1]++;
but with a QString
, however Qt doesn't allow me to do this:
QString s = "abc";
s[1]++;
After which I get a compilation error.
You can also use at()
method forQString
It works as below :
QString str = "abc";
QChar myChar = str.at(1) + 1
You can see QString
operations in this link
Got around it by using:
Thanks for the help