Search code examples
c++qtqlineedit

How to make qlineedit only for some string?


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?


Solution

  • Just use QComboBox and check it's editable flag

    enter image description here