certflow.widgets.flow_layout module¶ 自动换行的 FlowLayout。 根治「标签 + 控件」稀疏单控件被 addStretch() 撑满整行的问题(重构计划第 4/5 节)。 控件按内容宽度排布,一行放不下自动折到下一行。 class certflow.widgets.flow_layout.FlowLayout(parent=None, margin=0, spacing=-1)[源代码]¶ 基类:QLayout 流布局:水平排布子项,超出宽度自动换行。 参数: parent (QWidget | None) margin (int) spacing (int) addItem(item)[源代码]¶ 参数: item (QLayout.Item) 返回类型: None count()[源代码]¶ 返回类型: int itemAt(index)[源代码]¶ 参数: index (int) 返回类型: QLayout.Item | None takeAt(index)[源代码]¶ 参数: index (int) 返回类型: QLayout.Item | None expandingDirections()[源代码]¶ 返回类型: Orientation hasHeightForWidth()[源代码]¶ 返回类型: bool heightForWidth(width)[源代码]¶ 参数: width (int) 返回类型: int setGeometry(rect)[源代码]¶ 参数: rect (QRect) 返回类型: None sizeHint()[源代码]¶ 返回类型: QSize minimumSize()[源代码]¶ 返回类型: QSize staticMetaObject = PySide6.QtCore.QMetaObject("FlowLayout" inherits "QLayout": )¶