I will try to lay this out as best I can. I am writing a GUI with PyQt4 using Python 3.4.3.
The code I am writing stores information in a list and then pulls information from said list in order to complete tasks based on comparative logic between set positions in the list. Though it does not seem to like sending the text of a lineEdit in to a list and returns the error found at the bottom. Thanks for any assistance given. I'm sure it's something simple that I am overlooking.
The following is my code:
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
self.lineedit = QtGui.QLineEdit()
self.lineedit.setObjectName(_fromUtf8("lineedit"))
self.gridLayout_3.addWidget(self.lineedit, 30, 3, 1, 1)
self.button = QtGui.QPushButton(self.tab_6)
self.button.setObjectName(_fromUtf8("button"))
self.gridLayout_6.addWidget(button, 0, 3, 1, 1)
self.button.clicked.connect(Ui_MainWindow.call)
list = [1, 2, 3]
def call(self)
Ui_MainWindow.list[0] = self.lineedit.text()
This is the error message I have been getting from the above:
Traceback (most recent call last):
File "filename", line 11, in call
Ui_MainWindow.list[0] = self.lineedit.text()
AttributeError: 'bool' object has no attribute 'lineedit'
My question would be, why does this code error out rather than sending the .text() of lineedit to my list?