configwindow.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:dxf2gcode 作者: cnc-club 项目源码 文件源码
def __init__(self, text, unit = None, minimum = None, maximum = None, parent = None):
        """
        Initialization of the CfgSpinBox class (used for int values).
        @param text: text string associated with the SpinBox
        @param minimum: min value (int)
        @param minimum: max value (int)
        """
        QWidget.__init__(self, parent)

        self.spinbox = QSpinBox(parent)
        if unit is not None:
            self.setUnit(unit)

        self.setSpec({'minimum': minimum, 'maximum': maximum, 'comment': ''})

        self.label = QLabel(text, parent)
        self.layout = QHBoxLayout(parent);

        self.spinbox.setMinimumWidth(200) #Provide better alignment with other items
        self.layout.addWidget(self.label)
        self.layout.addStretch()
        self.layout.addWidget(self.spinbox)
        self.setLayout(self.layout)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号