def __init__(self, parent):
super().__init__('Margins', parent)
self.margin_left_edit = QtWidgets.QSpinBox(
self, minimum=0, maximum=999)
self.margin_right_edit = QtWidgets.QSpinBox(
self, minimum=0, maximum=999)
self.margin_vertical_edit = QtWidgets.QSpinBox(
self, minimum=0, maximum=999)
layout = QtWidgets.QGridLayout(self)
layout.setColumnStretch(0, 1)
layout.setColumnStretch(1, 2)
layout.addWidget(QtWidgets.QLabel('Left:', self), 0, 0)
layout.addWidget(self.margin_left_edit, 0, 1)
layout.addWidget(QtWidgets.QLabel('Right:', self), 1, 0)
layout.addWidget(self.margin_right_edit, 1, 1)
layout.addWidget(QtWidgets.QLabel('Vertical:', self), 2, 0)
layout.addWidget(self.margin_vertical_edit, 2, 1)
评论列表
文章目录