self.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)
self.setToolTip("Double click on a row to change its status. Right click on a host to add a tag.")
+ def keyPressEvent(self, event):
+ if (event.key() == Qt.Key_Space):
+ self.toggleSelection()
+ else:
+ QTreeView.keyPressEvent(self, event)
+
def mouseDoubleClickEvent(self, event):
+ self.toggleSelection()
+
+ def toggleSelection(self):
index = self.currentIndex()
model = index.model()
status_index = model.index(index.row(), MEMBERSHIP_STATUS_COLUMN, index.parent())