开发者

qtreewidgetitem addchild to already present item yields nothing

开发者 https://www.devze.com 2022-12-21 11:20 出处:网络
I have two QTreeWidgetItem that are top level. I want to make the second 开发者_StackOverflow中文版the parent of the first. Calling the first one\'s addChild(second item) shows no change. How would I

I have two QTreeWidgetItem that are top level. I want to make the second 开发者_StackOverflow中文版the parent of the first. Calling the first one's addChild(second item) shows no change. How would I accomplish this?


You probably have to remove the item you want to reparent first using takeItem(), and subsequently add it as a child to the new parent item.

0

精彩评论

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

关注公众号