I have a print layout with a bunch of items, two text labels among them. For the pluging I'm wrting right now I need a list with the two text labels. My initial idea was
labels = QgsProject.instance().layoutManager().layouts().QgsLayoutItemLabel().currentText()
However when I try to execute my plugin I get the following python error:
AttributeError: 'list' object has no attribute 'QgsLayoutItemLabel'
Any ideas how to get a list with the text labels?