We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f1ce42e commit c2a3d9aCopy full SHA for c2a3d9a
eval-file-pyqt5-set-value/python/input-number.py
@@ -1,8 +1,11 @@
1
def get_the_value(outer_locals):
2
from PyQt5.QtWidgets import QInputDialog
3
+ # locals().update(outer_locals) # a way to make the locals difference explicit
4
num, ok = QInputDialog.getInt(None, 'The number to be set', 'enter a number')
5
if ok:
6
outer_locals['set_the_answer'](num)
7
+ # locals()['set_the_answer'](num)
8
+ # set_the_answer(num) # this cannot work (see README)
9
10
if __name__ == '__main__':
11
from PyQt5.QtWidgets import QApplication
0 commit comments