开发者

qtreewidgetitem addchild to already present item yields nothing

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜