Hi!

I have QStringList genreItems which is list of music genres. I want to find index of genre "Rock", but I get other genre witch got "rock" in its name (Classical Rock), but witch is before Rock genre.
What should I do to find only element of list which is the same, not similar to my string?

Qt Code:
  1. QRegExp rx(my_genre);
  2. int genrePosition = genreItems.indexOf(rx);
To copy to clipboard, switch view to plain text mode