QScintilla  2.10
QScintilla - a Port to Qt v4 and Qt v5 of Scintilla

Introduction

QScintilla is a port to Qt of the Scintilla editing component.

As well as features found in standard text editing components, Scintilla includes features especially useful when editing and debugging source code:

QScintilla is a port or Scintilla to the Qt GUI toolkit from The Qt Company and runs on any operating system supported by Qt (eg. Windows, Linux, macOS, iOS and Android). QScintilla works with Qt v4 and v5.

QScintilla also includes language bindings for Python. These require that PyQt v4 or v5 is also installed.

This version of QScintilla is based on Scintilla v3.7.2.

Licensing

QScintilla is available under the GNU General Public License v3 and the Riverbank Commercial License.

The commercial license allows closed source applications using QScintilla to be developed and distributed. At the moment the commercial version of QScintilla is bundled with, but packaged separately from, the commercial version of PyQt.

The Scintilla code within QScintilla is released under the following license:

 License for Scintilla and SciTE
 Copyright 1998-2003 by Neil Hodgson neilh.nosp@m.@sci.nosp@m.ntill.nosp@m.a.or.nosp@m.g
 All Rights Reserved
 Permission to use, copy, modify, and distribute this software and its
 documentation for any purpose and without fee is hereby granted,
 provided that the above copyright notice appear in all copies and that
 both that copyright notice and this permission notice appear in
 supporting documentation.
 NEIL HODGSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
 SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
 AND FITNESS, IN NO EVENT SHALL NEIL HODGSON BE LIABLE FOR ANY
 SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
 WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
 TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
 OR PERFORMANCE OF THIS SOFTWARE.

Installation

As supplied QScintilla will be built as a shared library/DLL and installed in the same directories as the Qt libraries and include files.

If you wish to build a static version of the library then pass CONFIG+=staticlib on the qmake command line.

If you want to make more significant changes to the configuration then edit the file qscintilla.pro in the Qt4Qt5 directory.

If you do make changes, specifically to the names of the installation directories or the name of the library, then you may also need to update the Qt4Qt5/features/qscintilla2.prf file.

See your qmake documentation for more details.

To build and install QScintilla, run:

    cd Qt4Qt5
    qmake qscintilla.pro
    make
    make install

If you have multiple versions of Qt installed then make sure you use the correct version of qmake.

Installation on Windows

Before compiling QScintilla on Windows you should remove the Qsci directory containing the QScintilla header files from any previous installation. This is because the Makefile generated by qmake will find these older header files instead of the new ones.

Depending on the compiler you are using you may need to run nmake rather than make.

If you have built a Windows DLL then you probably also want to run:

    copy %QTDIR%\lib\qscintilla2.dll %QTDIR%\bin

Integration with qmake

To configure qmake to find your QScintilla installation, add the following line to your application's .pro file:

    CONFIG += qscintilla2

Example Application

The example application provided is a port of the standard Qt application example with the QsciScintilla class being used instead of Qt's QTextEdit class.

The example does not demonstrate all of the extra features of QScintilla.

To build the example, run:

    cd example-Qt4Qt5
    qmake application.pro
    make

On Windows (and depending on the compiler you are using) you may need to run nmake rather than make.

Python Bindings

The Python bindings are in the Python directory. You must have either PyQt v4 or v5 already installed. QScintilla must also already be built and installed.

The configure, build and install the bindings for PyQt v4, run:

    python configure.py
    make
    make install

On Windows (and depending on the compiler you are using) you may need to run nmake rather than make.

If you want to build the bindings for PyQt v5 then pass –pyqt=PyQt5 as an argument to configure.py.

configure.py supports a number of other arguments. Pass -h to display a list of the supported arguments.

configure.py was re-written for QScintilla v2.7.1 to make use of new features of PyQt v4.10. The old version is still provided as configure-old.py. The new configure.py will automatically invoke configure-old.py if it detects a version of PyQt earlier than v4.10. You may of course explicitly run configure-old.py.

Qt Designer Plugin

QScintilla includes an optional plugin for Qt Designer that allows QScintilla instances to be included in GUI designs just like any other Qt widget.

To build the plugin on all platforms, make sure QScintilla is installed and then run (as root or administrator):

    cd designer-Qt4Qt5
    qmake designer.pro
    make
    make install

On Windows (and depending on the compiler you are using) you may need to run nmake rather than make.