Syntax highlighting Qt text widget
Project description
syntaxedit
A simple Python Qt syntax highlighting widget
Features
- Extensive syntax and theme support - powered by Pygments
- Set font and font size
- Set indentation size
Usage
-
Install package
pip install syntaxedit
Or
poetry add syntaxedit
-
In your app, include the package, and create a
SyntaxEdit
widget:from syntaxedit.core import SyntaxEdit code = """# Todo list - [ ] Go shopping - [x] Walk the dog""" widget = SyntaxEdit(code)
Available options
content
: the initial content for the widget. Default:""
parent
: parent Qt widget for SyntaxEdit. Default:None
font
: the font family for the widget. Default:"Courier New"
font_size
: size to use for the font. Default:13
syntax
: the code syntax to use. Default:"Markdown"
theme
: the syntax theme to use. Default:"solarized-light"
indentation_size
: the size for indentation. Default:4
use_theme_background
: whether to use the background colour from the theme or to not set one. Default:True
Authors
By David Winter
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
syntaxedit-0.3.0.tar.gz
(3.9 kB
view hashes)
Built Distribution
Close
Hashes for syntaxedit-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b49564f0917ab3f3c1977d5f159c039aeeff85bb9e433d6f30607f408163e573 |
|
MD5 | 6ca0ded632f00628d363969b176da017 |
|
BLAKE2b-256 | 97b6c1d15de62baa76e893f835cefdee9abddf2718510d0d859a09256a2ef0f9 |