【问题标题】:Setting layout margins in pyqt在 pyqt 中设置布局边距
【发布时间】:2013-05-12 21:14:43
【问题描述】:

在 Qt Designer 中,我可以使用属性 layout*Margin 设置 VBox 或 HBox 的边距。

如何在 pyqt 中做到这一点?

【问题讨论】:

    标签: qt layout pyqt qt-designer


    【解决方案1】:

    你可以使用QLayout.setContentsMargins:

    # layout is a defined VBox or HBox
    layout.setContentsMargins(left, top, right, bottom)
    

    【讨论】:

      猜你喜欢
      • 2014-12-11
      • 1970-01-01
      • 2017-02-16
      • 1970-01-01
      • 2014-08-24
      • 1970-01-01
      • 1970-01-01
      • 2017-05-10
      • 2013-06-24
      相关资源
      最近更新 更多