PDA

View Full Version : Controlling QCompleter's pop-up



dthh
26th August 2010, 23:31
I am currently using a QCompleter with a QLineEdit. The code seems to work fine. But I would like to make 1 minor customization. If the user presses the up-arrow, before typing any text (to match) I would like to pop-up the entire list (which works) and automatically select the last item. I thought I could do this by calling setCurrentRow(). But that doesn't seem to change the pop-up display. Is there some other method of manipulating the pop-up display? My code is based on the QCompleter example (http://doc.trolltech.com/4.2/tools-customcompleter.html).

Thank you
David Brennan

dthh
27th August 2010, 01:19
After more digging. I did find my own answer in this forum post (http://www.qtcentre.org/threads/23518-How-to-change-completion-rule-of-QCompleter?highlight=qcompleter).

It didn't describe what I was trying to do, but there was a nugget of code at the end of the sample that worked out for me.