Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wbsoft/parceqt
Small Python library to use the Python parce module with Qt's QTextDocument
https://github.com/wbsoft/parceqt
Last synced: 15 days ago
JSON representation
Small Python library to use the Python parce module with Qt's QTextDocument
- Host: GitHub
- URL: https://github.com/wbsoft/parceqt
- Owner: wbsoft
- License: gpl-3.0
- Created: 2020-01-15T07:18:53.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-06-18T06:40:17.000Z (over 1 year ago)
- Last Synced: 2024-10-16T09:33:57.916Z (30 days ago)
- Language: Python
- Homepage: http://parce.info/parceqt
- Size: 185 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- Changelog: ChangeLog
- License: LICENSE
Awesome Lists containing this project
README
parceqt
=======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/parceqtExample:
.. code:: python
from PyQt5.QtWidgets import QApplication, QTextEdit
from PyQt5.QtGui import QTextDocumentapp = QApplication([])
doc = QTextDocument()
e = QTextEdit()
e.setDocument(doc)
e.resize(600, 400)
e.show()import parceqt
from parce.lang.xml import Xmlparceqt.set_root_lexicon(doc, Xml.root)
parceqt.highlight(doc)
parceqt.adjust_widget(e) # adjust widgets font and base colorsNow the text in the document is automatically highlighted using the specified
root lexicon; the highlighting is updated as the user modifies the text.