[QScintilla] block selection
Phil Thompson
phil at riverbankcomputing.com
Wed Dec 17 09:42:56 GMT 2008
On Wed, 17 Dec 2008 09:55:43 +0100, Petr Vanek <petr at scribus.info> wrote:
> hi all,
>
> I'd like to implement a "block selection" feature in my editor.
> Unfortunately it does not switch the mode as required - the stream mode
is
> always used.
>
> Envirionment: Qt4, C++, Suse Linux, QScintilla 2.3 rpm from Packman
> repository.
>
> Testcase: I modified example-Qt4 from QScintilla bundle (add action to
> menu,
> its connect and slot). The slot is listed:
>
> void MainWindow::handleSelection()
> {
> // switch selection mode
> int sel =
> textEdit->SendScintilla(QsciScintillaBase::SCI_GETSELECTIONMODE);
> textEdit->SendScintilla(QsciScintillaBase::SCI_SETSELECTIONMODE,
> sel==QsciScintillaBase::SC_SEL_STREAM
> ?
> QsciScintillaBase::SC_SEL_RECTANGLE
> :
> QsciScintillaBase::SC_SEL_STREAM);
> }
>
> it looks like there is always Stream mode in this minimal example.
>
> Well, maybe I'm calling SendScintilla with wrong parameters but (based on
> Scintilla docs
> http://www.scintilla.org/ScintillaDoc.html#SCI_SETSELECTIONMODE
> ) it looks like the right way.
>
> What should be wrong?
It's just not implemented in the Qt backend.
Phil
More information about the QScintilla
mailing list