我在 QMdiSubWindow 派生中的定位控件有问题。我使用 QtDesigner 设计了我的窗口,它看起来像这样:
当我运行应用程序时,它看起来像这样(标题栏上的按钮):
只有在最大化模式下才能正常:
但我希望它总是看起来正常。这是 .ui 文件的一部分:
<widget class="QPushButton" name="btnToggleEdit">
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>75</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>Edit</string>
</property>
</widget>
似乎它是相对于窗口角呈现的 - 无论窗口的标题栏如何......我该如何修复它?我正在使用 Qt 5.2.1(和 Visual Studio 2010 的 qt 插件)。