没有中央小部件的QDockWidget布局 [英] QDockWidget layout with no central widget
问题描述
我对QDockWidget有问题.我使用的是Qt Designer,我想构建一个仅带有停靠小部件的应用程序,并在上方设置一个用于显示属性的小栏.问题在于,如果没有主QWidget,我就无法构建应用程序(我的意思是仅 QDockWidgets).
I have a problem with QDockWidget. I'm using Qt Designer, and I would like to build an app with only dock-widgets, and have a small bar above for properties. The problem is that I cannot build the app without a main QWidget (I mean with only QDockWidgets).
这是我的屏幕截图:
注释1)-这是我无法删除的空间.当我从xml中删除它时,Qt Designer崩溃了.如果它不可移动,如何设置左侧QDockWidget和右侧QDockWidget的宽度为整个窗口宽度的一半?
Annotation 1) - this is the space that I can't remove. When I remove it from xml, Qt Designer crashes. If it is not removable, how can I set the left QDockWidget and the right QDockWidget to have half of the entire window width?
推荐答案
您可以使用setCentralWidget(0);
这篇关于没有中央小部件的QDockWidget布局的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!