Qualisys PySide6 SDK
PySide6-based SDK for the Qualisys Real-Time (RT) protocol. Stream motion capture data from QTM using Qt's native networking and signals/slots.
Installation
Requires Python 3.10+ and PySide6 6.0+.
We recommend using a virtual environment to avoid conflicts with other packages:
# Create and activate a virtual environment
python -m venv .venv
# Windows
.venv\Scripts\activate
# macOS / Linux
source .venv/bin/activate
Then install the package:
pip install qtm-rt-pyside6
Quick Start
import sys
from PySide6.QtCore import QCoreApplication
from qtm_rt_pyside6 import QTMConnection, QRTPacket
def on_packet(packet: QRTPacket):
print(f"Frame {packet.framenumber}")
result = packet.get_3d_markers()
if result:
header, markers = result
for marker in markers:
print(f" {marker.x}, {marker.y}, {marker.z}")
app = QCoreApplication(sys.argv)
connection = QTMConnection()
connection.connected.connect(lambda: connection.streamFrames(["3d"]))
connection.packetReceived.connect(on_packet)
connection.error.connect(lambda msg: print(f"Error: {msg}"))
connection.connectToHost("127.0.0.1")
sys.exit(app.exec())
API
QTMConnection Signals
| Signal | Description |
|---|---|
connected() |
Successfully connected and version negotiated |
disconnected() |
Disconnected from QTM |
error(str) |
Connection or protocol error |
packetReceived(QRTPacket) |
Data packet during streaming |
eventReceived(QRTEvent) |
QTM event (capture started, etc.) |
responseReceived(str, object) |
Command response (command_name, data) |
QTMConnection Methods
Core methods to get started:
connectToHost(host, port=22223, version="1.25", timeout_ms=5000)— Connect to QTMdisconnectFromHost()— Close the connectionstreamFrames(components, frames="allframes", udp_port=None, udp_address=None)— Start streaming; passudp_portto receive frames over UDP instead of TCPstreamFramesStop()— Stop streaminggetParameters(parameters)— Request current configuration as XML
See the class docstring or run help(QTMConnection) for the full method
list — control, load/save, trigger, LED, quit, XML settings, etc.
Components
Valid streaming components: 2d, 2dlin, 3d, 3dres, 3dnolabels, 3dnolabelsres, analog, analogsingle, force, forcesingle, 6d, 6dres, 6deuler, 6deulerres, gazevector, eyetracker, image, timecode, skeleton, skeleton:global
Examples
Ready-to-run scripts live in examples/ — see
examples/README.md for what each one demonstrates
and how to run it. basic_example.py is the shortest path to verify
your setup; the GUI examples (gui_example.py and gui_3d_example/)
show how to wire the SDK into a desktop application.
Known Limitations
- No automatic reconnection. If the connection drops, you must call
connectToHost()again. Listen to thedisconnectedsignal to detect this. - Single-threaded.
QTMConnectionandQTMDiscoveryareQObjectsubclasses and must be used from the thread that created them (typically the main thread). Use Qt signals for cross-thread communication. - Password sent in plain text.
takeControl(password)transmits the password unencrypted over TCP. This is a QTM protocol limitation — use on trusted networks only.
Development
To work on the SDK itself:
git clone https://github.com/qualisys/qualisys_pyside6_sdk.git
cd qualisys_pyside6_sdk
# Create and activate a virtual environment
python -m venv .venv
# Windows
.venv\Scripts\activate
# macOS / Linux
source .venv/bin/activate
# Install dev dependencies (pytest, pytest-qt, ruff, build) and the package
pip install -r requirements-dev.txt
pip install -e .
Run tests and linting:
pytest -v
ruff check .
ruff format --check .
License
MIT — see LICENSE and THIRD_PARTY_LICENSES.
Release files for qtm-rt-pyside6 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| qtm_rt_pyside6-1.0.0.tar.gz | 38.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| qtm_rt_pyside6-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 54.1 kB
Release files / qtm_rt_pyside6-1.0.0.tar.gz
| Download URL | qtm_rt_pyside6-1.0.0.tar.gz |
|---|---|
| Size | 38.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
70620ef26316844b26d8df6dc611f640fc684abc405fc07ff07b6986ce49540a
|
|
BLAKE2b-256 checksum How to use checksums |
5a9a1c6282ff0cf7ef033870ab2ff3f5fdb7d2b0f7e8e9e68a34e583cb544593
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 8, 2026.
Transparency logRelease files / qtm_rt_pyside6-1.0.0-py3-none-any.whl
| Download URL | qtm_rt_pyside6-1.0.0-py3-none-any.whl |
|---|---|
| Size | 15.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
eb9ce6c51eb1cb6e0538baa686cb0266e35b00b8ec5b19df4b5ca84eb426076c
|
|
BLAKE2b-256 checksum How to use checksums |
9a92b526249b512a55c7c6766c838a261deb8c15ea750faa850cedef7748801c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 8, 2026.
Transparency log