I'm newer for qt. I want to make a lineedit only sell signals for some string,like apple,banana,melon. How can I get it with regex or other method?
apple,banana,melon
Just use QComboBox and check it's editable flag
QComboBox
editable