I am trying to find the name of subgroups using pyqgis. I have been trying to use Playing with subgroups
I am however unable to traverse and get the names of the subgroup. I have tried the code on this article.
for child in root.children(): if isinstance(child, QgsLayerTreeGroup): print "- group: " + child.name() if child.name() == "test": #to check subgroups within test group for child in root.children(): #which I think i am making a mistake here because the root is supposed to contain all nodes
أكثر...
I am however unable to traverse and get the names of the subgroup. I have tried the code on this article.
for child in root.children(): if isinstance(child, QgsLayerTreeGroup): print "- group: " + child.name() if child.name() == "test": #to check subgroups within test group for child in root.children(): #which I think i am making a mistake here because the root is supposed to contain all nodes
أكثر...