Skip to main content

The parceqt Python module

Project description

Small Python library to use parce with Qt’s QTextDocument.

This module depends on parce ( and PyQt(


from PyQt5.QtWidgets import QApplication, QTextEdit
from PyQt5.QtGui import QTextDocument

app = QApplication([])
doc = QTextDocument()
e = QTextEdit()
e.resize(600, 400)

import parceqt
from parce.lang.xml import Xml

parceqt.set_root_lexicon(doc, Xml.root)
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.

Project details

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 hashes)

Uploaded source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page