From d276c689311fdcc53cd2fca286f556753f723352 Mon Sep 17 00:00:00 2001 From: Sietze van Buuren Date: Sun, 3 Nov 2024 20:22:07 +0100 Subject: [PATCH] docs: Mention usage of pqthreads in documentation and README Signed-off-by: Sietze van Buuren --- README.md | 1 + docs/introduction.md | 12 +++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a3930cc..837fbab 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ mlpyqtgraph enables [matplotlib](https://matplotlib.org/)-like plotting with [pyqtgraph](https://github.com/pyqtgraph/pyqtgraph) in existing python programs. +It relies on [pqthreads](https://github.com/swvanbuuren/pqthreads) to separate mlpyqtgraph's plotting functionality from the existing python program, by separating them in different `Qthread`s. Checkout the [documentation's introduction](https://swvanbuuren.github.io/mlpyqtgraph/introduction/) for more diff --git a/docs/introduction.md b/docs/introduction.md index 35dfaa2..8d25d10 100644 --- a/docs/introduction.md +++ b/docs/introduction.md @@ -15,8 +15,18 @@ of Qt](https://doc.qt.io/qt-6/thread-basics.html#gui-thread-and-worker-thread): the Graphical User Interface (GUI) is required to run in the main thread (also known as the "GUI thread"). +This is facilitated using the python package +[pqthreads](https://github.com/swvanbuuren/pqthreads), which exposes class +interfaces from the main GUI Thread in another `QThread` in [Qt for Python +(PySide)](https://wiki.qt.io/Qt_for_Python). In doing so, it facilitates +communication between the main (GUI) thread and a dedicated `QThread`s as +offered by [Qt for Python](https://wiki.qt.io/Qt_for_Python). + The following example illustrates how mlpyqtgraph can be used in an existing -python program defined in `main`. +python program defined in `main`. The decorator takes care of diverting all code +within the function it decorates into a separate `QThead`. mlpyqtgraph +functionality is only available inside the decorated function and any of the +function it calls. ```python