Pyqt5 How To Access Content Layou That Is Inside Another Layout (sub Layout)
Here I took part of the code Part of my code: def add_SP(self): self.layout_SArea_SP.addWidget(self.createLayout_groupbox_SP(self.layout_SArea_SP.count()+1)) def
Solution 1:
Thanks to the suggestion in the comments, I was able to implement the following:
def exemple_commands():
print(self.layout_SArea_SP.itemAt(0).widget().layout().itemAt(0).widget().currentText())
print(self.layout_SArea_SP.itemAt(0).widget().layout().itemAt(1).widget().text())
print(self.layout_SArea_SP.itemAt(0).widget().layout().itemAt(2).widget().text())
print(self.layout_SArea_SP.itemAt(0).widget().layout().itemAt(3).widget().text())
print(self.layout_SArea_SP.itemAt(1).widget().layout().itemAt(0).widget().currentText())
print(self.layout_SArea_SP.itemAt(1).widget().layout().itemAt(1).widget().text())
print(self.layout_SArea_SP.itemAt(1).widget().layout().itemAt(2).widget().text())
print(self.layout_SArea_SP.itemAt(1).widget().layout().itemAt(3).widget().text())
Post a Comment for "Pyqt5 How To Access Content Layou That Is Inside Another Layout (sub Layout)"