code: def printChildren(obj, indent=""):
      
      children=obj.children()
      if children==None:
          return
      for child in children:
          try:
              childName = child.objectName()
          except AttributeError:
              childName = "<no-name>"
  
          #print ("{}{:10s}: {}".format(indent, childName, child.__class__))
          print ("{}{!r}: {}".format(indent, childName, child.__class__))
          printChildren(child, indent + "    ")
docs: Recursively prints the children of a QObject. Useful for debugging.