unitedit.py 文件源码

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

项目:pcbre 作者: pcbre 项目源码 文件源码
def __init__(self, unitGroup, field_type=int):
        super(UnitLineEdit, self).__init__()
        self.unit_idx = 0
        self._value = 0
        self._field_type = float

        self.layout = QtGui.QHBoxLayout()
        self.layout.setContentsMargins(0,0,0,0)

        self.__lineEdit = PLineEdit()
        self.__lineEdit.editingFinished.connect(self.text_changed)

        self.__unitDropDown = QtGui.QComboBox()
        self.__unitDropDown.currentIndexChanged.connect(self.indexChanged)

        self._placeholder_value = None

        self.setLayout(self.layout)
        self.layout.addWidget(self.__lineEdit, 0)
        self.layout.addWidget(self.__unitDropDown, 1)

        self.setUnitGroup(unitGroup)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号