Small Python library to use parce with Qt’s QTextDocument.
This module depends on parce (https://parce.info/) and PyQt(https://riverbankcomputing.com/software/pyqt)
Homepage: https://github.com/wbsoft/parceqt
Download: https://pypi.org/project/parceqt
Documentation: https://parce.info/parceqt
Example:
from PyQt5.QtWidgets import QApplication, QTextEdit
from PyQt5.QtGui import QTextDocument
app = QApplication([])
doc = QTextDocument()
e = QTextEdit()
e.setDocument(doc)
e.resize(600, 400)
e.show()
import parceqt
from parce.lang.xml import Xml
parceqt.set_root_lexicon(doc, Xml.root)
parceqt.highlight(doc)
parceqt.adjust_widget(e) # adjust widgets font and base colors
Now the text in the document is automatically highlighted using the specified root lexicon; the highlighting is updated as the user modifies the text.
Metadata
Release files for parceqt 0.33.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| parceqt-0.33.0.tar.gz | 41.6 kB | Details |
Release files / parceqt-0.33.0.tar.gz
| Download URL | parceqt-0.33.0.tar.gz |
|---|---|
| Size | 41.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6c6a66119576daf472b4c99d48e5ced089efda92443418c9a5840663490ca51b
|
|
BLAKE2b-256 checksum How to use checksums |
bf3fa7713c67144f3fb7a3cc9ce9d32b065aa3da66fd2d9b2b17ab070b91e412
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.25.1 rfc3986/1.5.0 tqdm/4.57.0 urllib3/1.26.5 CPython/3.10.6
|