QgsCodeEditorPython class

A Python editor based on QScintilla2.

Adds syntax highlighting and code autocompletion.

Base classes

class QgsCodeEditor
A text editor based on QScintilla2.

Constructors, destructors, conversion operators

QgsCodeEditorPython(QWidget* parent = nullptr, const QList<QString>& filenames = QList<QString>())
Construct a new Python editor.

Public functions

void loadAPIs(const QList<QString>& filenames)
Load APIs from one or more files.
auto loadScript(const QString& script) -> bool
Load a script file.

Function documentation

QgsCodeEditorPython::QgsCodeEditorPython(QWidget* parent = nullptr, const QList<QString>& filenames = QList<QString>())

Construct a new Python editor.

Parameters
parent The parent QWidget
filenames The list of apis files to load for the Python lexer

void QgsCodeEditorPython::loadAPIs(const QList<QString>& filenames)

Load APIs from one or more files.

Parameters
filenames The list of apis files to load for the Python lexer

bool QgsCodeEditorPython::loadScript(const QString& script)

Load a script file.

Parameters
script The script file to load