mirror of
https://github.com/HaujetZhao/CapsWriter.git
synced 2025-07-13 13:02:08 +08:00
为添加api的输入框设置了字符校验器,可以避免添加引擎的时候意外输入空格或者换行符
This commit is contained in:
parent
c711dfc66c
commit
3d727d0364
@ -33,6 +33,9 @@ class Dialog_AddEngine(QDialog):
|
||||
self.表格布局 = QFormLayout()
|
||||
self.按钮横向布局 = QHBoxLayout()
|
||||
|
||||
self.Api输入校验器 = QRegExpValidator()
|
||||
|
||||
|
||||
def initSlots(self):
|
||||
self.服务商选择框.currentTextChanged.connect(self.服务商变化)
|
||||
|
||||
@ -68,6 +71,11 @@ class Dialog_AddEngine(QDialog):
|
||||
self.setWindowTitle(self.tr('添加或更新 Api'))
|
||||
self.setWindowModality(Qt.NonModal)
|
||||
|
||||
self.Api输入校验器.setRegExp(QRegExp(r'\w+'))
|
||||
self.appKey输入框.setValidator(self.Api输入校验器)
|
||||
self.accessKeyId输入框.setValidator(self.Api输入校验器)
|
||||
self.AccessKeySecret输入框.setValidator(self.Api输入校验器)
|
||||
|
||||
if self.列表.currentItem():
|
||||
已选中的列表项 = self.列表.currentItem().text()
|
||||
填充数据 = self.从数据库得到选中项的数据(已选中的列表项)
|
||||
|
Loading…
Reference in New Issue
Block a user