XmlView.__init__(self, parent)
def expandMatchingText(self, txt):
- print "LHS", txt
self.collapseAll()
self.expandToDepth(0)
self.expand(index)
def search(index):
- print index.data().toString()
- if index.data().toString() == txt:
+ # voodoo alert: baris was using index.data()
+ # and apparently it worked. But after me
+ # messing around, only index.model().data(index)
+ # seems to give non-empty QVariant as output.
+ if index.model().data(index).toString() == txt:
recursiveExpand(index)
self.scrollTo(index, self.PositionAtCenter)
return
layout.addWidget(self.view)
self.setLayout(layout)
- print 'CHILDREN', str(self.children())
self.updateView()
def showNode(self, hostname):
- print "SHOWNODE"
self.view.expandMatchingText(hostname)
def updateView(self):