Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 GraphicsLayoutWidget 中有很多 PlotItems。我使用 plotItem.setFixedHight() 来设置所有地块的高度。GraphicsLayoutWidget 的高度似乎不等于所有图的总和。如何计算高度。
Qt 中的布局和控件大小是一个复杂的主题。在 GraphicsLayoutWidget 的情况下,小部件的大小完全由包含它的布局决定,因此它的内容不一定会影响它的大小。
如果您为每个绘图设置固定高度并且您知道 GraphicsLayout 中的行数,那么您不能相应地设置 GraphicsLayoutWidget 的固定高度吗?