<div dir="ltr"><div><div>Hi,<br><br>There has been some discussion on having QScintilla2 [0] code editors for Project Macros and for Expression Builder text areas, i.e. in core C++ code.<br><br></div>Currently the Qsci.so (QScintilla2) Python module is a runtime dependency for the new console and its editor, and for an editor in Processing. In order to embed similar code editors in C++ classes, the libqscintilla2 library will need to be found and linked during the build process. Since the C++ lib is a dependency for installs of the Python module, most users should already have it.<br>
<br></div><div>I think it would be prudent to then establish a base class, e.g. QgsCodeEditor, with python bindings. I believe Salvatore may have started on this, and there may be some C++ libs or projects out there already to investigate. Once that's done, we can port the console's 'code editor' font and color styles settings to C++ and add a new tab in Options.<br>
</div><div><div><div><div><br></div><div>This will allow the editors in Console and Processing to have parity with user-chosen styles, so all editors look, and generally work, the same across the app, regardless of underlying code language. It is unclear to me whether the C++ subclass of QScintilla2 can just be passed as a PyQt object, via PyQGIS bindings, and only the Qsci.so module is still required. I would assume so, but will ask on the PyQt list.<br>
<br></div><div>If there is a concern about adding this libqscintilla2 dependency in the CMake setup, please share your opinion so we can discuss it, before I commit the change.<br><br>[0] <a href="http://www.riverbankcomputing.com/software/qscintilla/intro">http://www.riverbankcomputing.com/software/qscintilla/intro</a><br>
<br></div><div>Regards,<br></div><div><br>Larry</div>
</div></div></div></div>