Are you using QCompleter or something of your own?
Perhaps easiest to post a short, self-contained program that demonstrates the problem.