[PyKDE] QMultiLineEdit.setSelection()

Boudewijn Rempt bsarempt at xs4all.nl
Mon Jul 9 12:48:21 BST 2001


On Sun, 8 Jul 2001, Phil Thompson wrote:

> Boudewijn Rempt wrote:
> > 
> > I just found out that setSelection() isn't implemented:
> > 
> > Not implemented: setSelection
> > Aborted
> 
> That's not a PyQt message.

So I thought - but then I took a look in the Qt source code,
and I found that it _was_ implemented - with the C++ equivalent
of the code below.

> 
> > Could this be added before the release of 2.5? (Not that
> > it is exceptionally urgent, since it's equivalent to:
> >        self.editor.setCursorPosition(l1, c1, FALSE)
> >        self.editor.setCursorPosition(l2, c2, TRUE)), but
> > it is confusing...
> 
> It's in the .sip file.  What version of Qt are you using?

2.3.1 - compiled from source from Trolltech, not KDE's qt-copy.

I've found another thing I can't really explain. When I get
the text from a QMultiLineEdit (with the text() function),
the docs say I should get a copy of the internal string. However,
whenever I try to replace something in that string, the entire
application segfaults. I haven't yet got a small test script,
and anyway, I'm sure whether it's my fault, Qt's fault or PyQt's
fault.





More information about the PyQt mailing list