简体   繁体   中英

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?

Just use QComboBox and check it's editable flag

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM