[Qt-interest] QsciScintilla scroll area problem?

Ruan WenBO drizt.ruan at gmail.com
Mon Aug 24 17:28:26 CEST 2009


Hi,
I want to write a application which has two
QsciScintilla<http://www.riverbankcomputing.co.uk/static/Docs/QScintilla2/classQsciScintilla.html#c466f32c3d7e51790b6b25c86478317998ee0a7e261ec6cac6d89ba869117546>widgets
, these widgets has same copy of a bunch of data, but they has
different views. I want to implement that when user scroll one of these
widgets , the another one could view the same lines . Now i search the
documents and only find this method:
connect the signal of cursorPositionChanged,

QObject.connect(self.plainTextEdit_1, SIGNAL("cursorPositionChanged(int,
int)"), self.linesChanged)

and in my slot:
def linesChanged(self,  line,  ident):
        self.plainTextEdit_2.setCursorPosition(line,  0)

but the is that when I scroll the widgets with mouse, this signal has
nothing to do, and even I click the widget to force signal emit, the result
is not perfect, the plainTextEdit_2 widget always has inaccuracy of some
lines.

Can you give me some advises?

sincerely
 drizt.ruan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090824/f70b9e6f/attachment.html 


More information about the Qt-interest-old mailing list