I have a QMultiHash storing a crossword dictionary with int word length keys and qstring word values. I want to be able to get a random word for a given length, instead of the first value associated with the key, both for randomization and also for use in my word placing algorithm that tries different words for a given length. I could remove a used word value from the hash to solve the latter problem, but that's not ideal and still leaves the program attempting to use the same word to start each time.

Is there a way to do this or a better alternative? I'd like to still be able to use QHash as I have a ton of entries and need quick lookup.