PDA

View Full Version : QLineEdit with multiple strings by default.



robgeek
24th June 2019, 01:51
Hello!

I'm using PyQT Designer and I would like to know which widget I have to use to get strings from user(like QLineEdit) but with multiples lines of strings setted by default. I mean, like when you click in your url field in your webbrowser and you get your history. I want the same thing, then when the user click on one of these strings something hapens. Or he could type his own string.

If QLineEdit doest that how can I set those default strings?

Added after 1 52 minutes:

I don't know if is the proper solution but I think I found.

QComboBox setted as editable. If you have any suggestion, maybe this is not the best solution...

anda_skoa
24th June 2019, 06:30
QComboBox is definitely a viable choice.

Another option is to use a QLineEdit and a QCompleter

Cheers,
_