Exemple #1
0
class TestWidget(QSplitter):
    def __init__(self, parent):
        super(TestWidget, self).__init__(parent)
        self.editor = TestEditor(self)
        self.addWidget(self.editor)
        self.classtree = ClassBrowser(self)
        self.addWidget(self.classtree)
        self.connect(self.classtree, SIGNAL("edit_goto(QString,int,QString)"),
                     lambda _fn, line, word: self.editor.go_to_line(line, word))
        self.setStretchFactor(0, 4)
        self.setStretchFactor(1, 1)
        
    def load(self, filename):
        self.editor.load(filename)
        self.classtree.set_current_editor(self.editor, filename, False)
Exemple #2
0
 def __init__(self, parent):
     super(TestWidget, self).__init__(parent)
     self.editor = TestEditor(self)
     self.addWidget(self.editor)
     self.classtree = ClassBrowser(self)
     self.addWidget(self.classtree)
     self.connect(self.classtree, SIGNAL("edit_goto(QString,int,QString)"),
                  lambda _fn, line, word: self.editor.go_to_line(line, word))
     self.setStretchFactor(0, 4)
     self.setStretchFactor(1, 1)