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.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
parceqt-0.33.0.tar.gz
(41.6 kB
view details)
File details
Details for the file parceqt-0.33.0.tar.gz.
File metadata
- Download URL: parceqt-0.33.0.tar.gz
- Upload date:
- Size: 41.6 kB
- Tags: Source
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6c6a66119576daf472b4c99d48e5ced089efda92443418c9a5840663490ca51b
|
|
| MD5 |
6cc1c7f5072cc92f9176ec8574d6d922
|
|
| BLAKE2b-256 |
bf3fa7713c67144f3fb7a3cc9ce9d32b065aa3da66fd2d9b2b17ab070b91e412
|