开发者

Is there a way to detect when all child items within a QTreeWidgetItem have been marked 'hidden'?

开发者 https://www.devze.com 2023-01-09 09:58 出处:网络
Is there a preferred way to detect when all of a QTreeWidgetItem\'s children are marked as hidden?Currently, I\'m iterating over all of them every time any of them are hid开发者_StackOverflow中文版den

Is there a preferred way to detect when all of a QTreeWidgetItem's children are marked as hidden? Currently, I'm iterating over all of them every time any of them are hid开发者_StackOverflow中文版den.


Keep a counter of hidden items and change the value of the counter if an item changed its state of hidden-ness. So each time you use the information you do not iterate over all items!

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号