Examples
Standalone example apps demonstrating pyside6_scintilla. Each one lives
under examples/
in the repository and can be run directly after uv sync:
uv run python examples/<example>/main.py
Basic
-
Simple ScintillaEditBase edit
A minimal
QMainWindowbuilt aroundScintillaEditBase, with a line-number margin toggle and block (rectangular) selection/editing. -
Simple ScintillaEdit edit
A minimal
QMainWindowbuilt aroundScintillaEdit's typed methods, with a line-number margin toggle, "Go to Line", and block (rectangular) selection/editing. -
BScintillaEdit drop-in replacement
A small, portable, single-file
BScintillaEdit(QScrollArea)widget that's a drop-in replacement for the old, now-archivedbscintillaeditPyPI package's widget of the same name, meant to be copied into your own project.
Autocomplete
-
Autocomplete from a keyword list
Word autocompletion in a
ScintillaEditfrom a static keyword list — the equivalent of QScintilla'sQsciAPIs+setAutoCompletion*layer, driving Scintilla'sautoCShow()fromcharAdded(plus Ctrl+Space) and reacting toautoCompleteSelection/autoCompleteCancelled.
Highlighting/Folding
-
Lexilla highlighting and folding
Real C++ syntax highlighting and folding in a
ScintillaEdit, driven by a lexilla-created"cpp"lexer wired in viaSCI_SETILEXER— no per-edit re-tokenizing glue needed, since Scintilla calls the lexer'sLex()/Fold()itself. -
Pygments highlighting
Python syntax highlighting in a
ScintillaEdit, driven by a Pygments lexer and applied manually via rawSCI_STYLE*messages. -
tree-sitter highlighting and folding
Python syntax highlighting and code folding in a
ScintillaEdit, driven by a tree-sitter grammar — styling applied via rawSCI_STYLE*messages, folding viasetFoldLevel().