[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Help with KTextEditor python programing
From: "dangbinghoo () gmail ! com" <dangbinghoo () gmail ! com>
Date: 2014-11-25 9:41:18
Message-ID: CALM-Y9xgm6xebWK7A=nSfzCpNzix12kkJmbGxoSorrKKykMLyA () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
hi all,
I'm programing in python to use kate part as my main editor component in my
project. But I had problem using the api.
I can get an editor with following code:
class EditorViewBase(QSplitter):
def __init__(self, parent=None):
QSplitter.__init__(self)
self.__editor = KTextEditor.EditorChooser.editor()
self.doc = self.__editor.createDocument(self)
self.edit = self.doc.createView(self)
however, I want to toggle the line-number on, and also fold and bookmarks.
I found there's a abstract interface in cpp code:
KTextEditor::ConfigInterface,
but I don't know how to access the interface in python.
any body can help me ?
Thanks!
Best regards,
Binghoo Dang.
[Attachment #5 (text/html)]
<div dir="ltr">hi all, <div><br></div><div>I'm programing in python to use kate part as my main \
editor component in my project. But I had problem using the api.</div><div><br></div><div>I can get an \
editor with following code:</div><div><br></div><div><div>class \
EditorViewBase(QSplitter):</div><div><span class="" style="white-space:pre"> </span>def __init__(self, \
parent=None):</div><div><span class="" \
style="white-space:pre"> </span>QSplitter.__init__(self)</div></div><div><div><span class="" \
style="white-space:pre"> </span>self.__editor = KTextEditor.EditorChooser.editor()</div><div><span \
class="" style="white-space:pre"> </span>self.doc = self.__editor.createDocument(self)</div><div><span \
class="" style="white-space:pre"> </span>self.edit = \
self.doc.createView(self)</div></div><div><br></div><div>however, I want to toggle the line-number on, \
and also fold and bookmarks.</div><div><br></div><div>I found there's a abstract interface in cpp \
code: KTextEditor::ConfigInterface,</div><div>but I don't know how to access the interface in \
python.</div><div><br></div><div>any body can help me ? \
</div><div><br></div><div>Thanks!</div><div><br></div><div>Best regards,</div><div><br></div><div>Binghoo \
Dang.</div></div>
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic