gpt4 book ai didi

qt - 如何从 QSplitter 中删除 QWidgets

转载 作者:行者123 更新时间:2023-12-03 21:12:07 25 4
gpt4 key购买 nike

在我的应用程序中有一个由 QSplitter 拆分的窗口,我需要删除一个小部件。

我怎样才能做到这一点?我找不到有用的方法

最佳答案

Qt 中的许多东西不能“传统地”删除。而是在其上调用 hide() 并销毁它。来自 QSplitter文档:

When you hide() a child its space will be distributed among the other children. It will be reinstated when you show() it again.

关于qt - 如何从 QSplitter 中删除 QWidgets,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/371599/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com