How to find elements in a QString to the right of a character
c++, qt
Solution
You can extract the file name like this:
QFileInfo("c:/ ..... /whatIAmActuallyInterestedIn.stuff").fileName();
Problem
I have a filename as a QString which looks like "c:/ ..... /whatIAmActuallyInterestedIn.stuff" I want to get all the information after the last /, which in this case would be whatIAmActuallyInterestedIn.stuff Right now, I know that I can convert this to a std::string, use rfind to find the last / in the string, and then convert it back to a QString for then outputting. However, this seems like doing an excessive amount of work for something that I am fairly certain QString has built in, I just can't find the function call.