Hello Everybody,
I have a nice small program that I am working to include as part of a project...
Code:
def __init__(self):
...
self.connect(insert, QtCore.SIGNAL('triggered()'), self.showDialog)
self.setFocus()
...
def showDialog(self):
text, ok = QtGui.QInputDialog.getText(self, 'Input Dialog','Enter your name:')
if ok:
self.label.setText(unicode(text))
It runs, open the mainwindow, the menu, etc... but gives me the following error when I press OK after informing the name.
Code:
Traceback (most recent call last):
File "C:\dev\testsubCode\src\pytest.py", line 45, in showDialog
self.label.setText(unicode(text))
AttributeError: label
I guess it might be a simple detail, but I couldn't figure out what. Any suggestions?
All comments and suggestion are welcome.
