【发布时间】:2015-03-11 14:08:22
【问题描述】:
我在 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 插件)。
【问题讨论】:
-
你应该使用 Qt 布局。
标签: c++ qt position controls qmdiarea