self.firstField, self.secondField
Можно ли считать циклом все значения из них, например в кортеж?
self.firstField, self.secondField
spisok = [self.firstField, self.secondField]
new_spisok = [] for i in spisok: give_text = i.text() new_spisok.append(give_text)
Form[0].QLineEdit[0]
from PyQt4.Qt import * app = QApplication([]) w = QWidget() lbl1 = QLabel('lbl1') lbl2 = QLabel('lbl2') lbl3 = QLabel('lbl3') lay = QVBoxLayout(w) lay.addWidget(lbl1) lay.addWidget(lbl2) lay.addWidget(lbl3) w.move(0,0) w.show() for i in w.children(): if type(i) == QLabel: print i.text() app.exec_()