Skip to content

Commit

Permalink
docs: Mention usage of pqthreads in documentation and README
Browse files Browse the repository at this point in the history
Signed-off-by: Sietze van Buuren <[email protected]>
  • Loading branch information
swvanbuuren committed Nov 3, 2024
1 parent 6f40d91 commit d276c68
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 11 additions & 1 deletion docs/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d276c68

Please sign in to comment.