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