add something
This commit is contained in:
parent
f28b353c5e
commit
756093b8a7
1 changed files with 7 additions and 1 deletions
8
__main__.py
Executable file → Normal file
8
__main__.py
Executable file → Normal file
|
@ -84,7 +84,13 @@ class MainWindow(QtGui.QMainWindow, ui.Ui_MainWindow):
|
|||
self.lineEdit.returnPressed.connect(self.input_characters)
|
||||
self.pushButton.clicked.connect(self.input_characters)
|
||||
def input_characters(self):
|
||||
print("Hello world")
|
||||
characters = self.lineEdit.text()
|
||||
chinese_char_pattern = QtCore.QRegExp("[\x{4e00}-\x{9fa5}]+")
|
||||
validator = QtGui.QRegExpValidator( chinese_char_pattern, characters)
|
||||
if validator.validare():
|
||||
print (characters)
|
||||
else:
|
||||
print("error")
|
||||
#TODO: validate, and return result
|
||||
|
||||
def main():
|
||||
|
|
Loading…
Reference in a new issue