简体   繁体   English

具有历史记录的PyQt QLineEdit

[英]PyQt QLineEdit with history

Do you know an easy way to make an "history" on a QLineEdit in PySide/PyQt? 您知道在PySide / PyQt中的QLineEdit上创建“历史记录”的简便方法吗?

Example: Whenever Enter is pressed, the typed text will be stored, and pressing the "up" or "down" arrows allows you to navigate through the history. 示例:只要按下Enter键,就会存储键入的文本,并且按下“向上”或“向下”箭头可浏览历史记录。

Thank you very much 非常感谢你

Blah.... 等等....

I just figured that the QComboBox does exactly what I want to do when the "setEditable" is on... 我只是想知道,当“ setEditable”打开时,QComboBox确实可以完成我想做的事情。

It has a completer, and an history of whatever was typed in the textfield! 它具有完成器,以及在文本字段中键入内容的历史记录!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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