Calculadora: configurando o "backspace" do display no botão "◀" (D)
This commit is contained in:
@@ -30,7 +30,7 @@ class ButtonsGrid(QGridLayout):
|
|||||||
super().__init__(*args, **kwargs)
|
super().__init__(*args, **kwargs)
|
||||||
|
|
||||||
self._gridMask = [
|
self._gridMask = [
|
||||||
['C', '◀', '^', '/'],
|
['C', 'D', '^', '/'],
|
||||||
['7', '8', '9', '*'],
|
['7', '8', '9', '*'],
|
||||||
['4', '5', '6', '-'],
|
['4', '5', '6', '-'],
|
||||||
['1', '2', '3', '+'],
|
['1', '2', '3', '+'],
|
||||||
@@ -78,6 +78,9 @@ class ButtonsGrid(QGridLayout):
|
|||||||
if text == 'C':
|
if text == 'C':
|
||||||
self._connectButtonClicked(button, self._clear)
|
self._connectButtonClicked(button, self._clear)
|
||||||
|
|
||||||
|
if text in 'D':
|
||||||
|
self._connectButtonClicked(button, self.display.backspace)
|
||||||
|
|
||||||
if text in '+-/*^':
|
if text in '+-/*^':
|
||||||
self._connectButtonClicked(
|
self._connectButtonClicked(
|
||||||
button,
|
button,
|
||||||
|
|||||||
Reference in New Issue
Block a user