def __init__(self, text, parent, desk): super(container, self).__init__() hbox = QHBoxLayout(self) hbox.setSpacing(0) hbox.setContentsMargins(0,0,0,0) # input widget self.edit = inputWidget.inputClass(parent, desk) self.edit.executeSignal.connect(parent.executeSelected) if text: self.edit.addText(text) # if not context == 'hou': # line number self.lineNum = numBarWidget.lineNumberBarClass(self.edit, self) hbox.addWidget(self.lineNum) hbox.addWidget(self.edit)
def __init__(self, text, parent, desk): super(container, self).__init__() hbox = QHBoxLayout(self) hbox.setSpacing(0) hbox.setContentsMargins(0, 0, 0, 0) # input widget self.edit = inputWidget.inputClass(parent, desk) self.edit.executeSignal.connect(parent.executeSelected) if text: self.edit.addText(text) # if not context == 'hou': # line number self.lineNum = numBarWidget.lineNumberBarClass(self.edit, self) hbox.addWidget(self.lineNum) hbox.addWidget(self.edit)
def __init__(self, text, parent, desk): super(container, self).__init__() hbox = QHBoxLayout(self) hbox.setSpacing(0) hbox.setContentsMargins(0,0,0,0) # input widget self.edit = inputWidget.inputClass(parent, desk) self.edit.executeSignal.connect(parent.executeSelected) if text: self.edit.addText(text) # if not context == 'hou': # line number # if context == 'hou': # import hou # if hou.applicationVersion()[0] > 14: hbox.addWidget(self.edit) # return self.lineNum = numBarWidget.lineNumberBarClass(self.edit, self) self.edit.verticalScrollBar().valueChanged.connect(lambda :self.lineNum.update()) self.edit.inputSignal.connect(lambda :self.lineNum.update()) hbox.addWidget(self.lineNum) hbox.addWidget(self.edit)