mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-31 18:40:56 +00:00
Allow only [1-9]+ in Pin matrix
This commit is contained in:
parent
0634d6bbb4
commit
12955a0c0c
@ -1,7 +1,7 @@
|
||||
import sys
|
||||
from PyQt4.Qt import QApplication, QWidget, QGridLayout, QVBoxLayout
|
||||
from PyQt4.QtGui import QPushButton, QLineEdit, QSizePolicy
|
||||
from PyQt4.QtCore import QObject, SIGNAL
|
||||
from PyQt4.QtGui import QPushButton, QLineEdit, QSizePolicy, QRegExpValidator
|
||||
from PyQt4.QtCore import QObject, SIGNAL, QRegExp
|
||||
|
||||
class PinButton(QPushButton):
|
||||
def __init__(self, password, encoded_value):
|
||||
@ -27,6 +27,7 @@ class PinMatrixWidget(QWidget):
|
||||
self.buttons = []
|
||||
|
||||
self.password = QLineEdit()
|
||||
self.password.setValidator(QRegExpValidator(QRegExp('[1-9]+'), None))
|
||||
self.password.setEchoMode(QLineEdit.Password)
|
||||
|
||||
grid = QGridLayout()
|
||||
|
Loading…
Reference in New Issue
Block a user