问题描述
如何在入门级将我的 QLineEdit 转换为大写或全部大写?
How to convert My QLineEdit into a Capitalize or all upper Case at Entry Level ?
(如果我在我的文本框(QLineEdit)中输入字符串,它会根据用户定义的方法自动将输入字符串转换或格式化.(大写或大写))
( If I enter string into my text box (QLineEdit), automatically its converts or format the input string to, as per user defined method. ( Capitalize or Upper Case ))
如果我输入公司名称为google inc",则其转换如下Google Inc".
If I enter a name of the company as "google inc" then its converts as follows " Google Inc" .
推荐答案
以下代码对我来说很好.我也是 PyQt5 和 Python 的新手.所以如果你能让这个更pythonic,请告诉我
The following code works to me fine. I am also new to PyQt5 and Python. so if you can make this more pythonic please let me know
这篇关于在 PyQt5 中,如何将普通的 QLineEdit(文本框)转换为完美的大写/大写 QLineEdit 框?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!