szczav
19th June 2007, 17:01
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?
QRegExp rx(my_genre);
int genrePosition = genreItems.indexOf(rx);
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?
QRegExp rx(my_genre);
int genrePosition = genreItems.indexOf(rx);