configwindow.py 文件源码

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

项目:dxf2gcode 作者: cnc-club 项目源码 文件源码
def __init__(self, text, size_min = None, size_max = None, parent = None):
        """
        Initialization of the CfgLineEdit class (text edit, one line).
        @param text: text string associated with the line edit
        @param size_min: min length (int)
        @param size_max: max length (int)
        """
        QWidget.__init__(self, parent)

        self.lineedit = QLineEdit(parent)

        self.setSpec({'minimum': size_min, 'maximum': size_max, 'comment': ''})
        if size_min is not None:
            self.size_min = size_min
        else:
            self.size_min = 0

        self.label = QLabel(text, parent)
        self.layout = QVBoxLayout(parent)

        self.layout.addWidget(self.label)
        self.layout.addWidget(self.lineedit)
        self.setLayout(self.layout)
        self.layout.setSpacing(1) #Don't use too much space, it makes the option window too big otherwise
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号