TreeWidget Parent Child Check
I want to check whether a particular row in tree widget have parent and child. When i give single click on a row it have to check for parent and chil开发者_如何学Cd. Can some one give some idea
- Open Qt Assistant
- Look for QTreeWidget
- Go to Signals section and see which signal you really need - I assume
itemClicked()
oritemActivated()
in you case - Examine what info you get from the chosen signal - a QTreeWidgetItem may be?
- Go to QThreeWIdgetItem in Qt Assistant
- Look some functions that can help you - may be
childCount()
andparent()
?
Hope this helps
精彩评论