On this page

Qt Edge AI C++ Classes

Provides C++ classes for building on-device inference flows. More...

This module is in Technical Preview state.

Classes

QInferenceBackendDataPort

The abstract base class for backend-specific port implementations

QInferenceBackendFactory

Creates QInferenceBackendStep and QInferenceBackendFlow instances from loaded plugins

QInferenceBackendFlow

The abstract base class for backend-specific pipeline flows

QInferenceBackendStep

The abstract base class for backend-specific pipeline steps

QInferenceDataPort

Represents an input or output of a QInferenceStep through which data flows

QInferenceFlow

Manages a pipeline of data-processing steps and their connections

QInferenceResultParser

Parses JSON data from the pipeline

QInferenceStep

The base class for pipeline steps that produce or consume data

QInferenceVideoSource

Video frames to the pipeline

QVisionInference

Runs AI inference on video frames

Detailed Description

The Qt Edge AI C++ classes describe an inference pipeline as a flow of steps that exchange data through typed ports, and provide the backend interfaces that plugins implement to run the pipeline.

To use these classes in your application, add the following include statement:

#include <QtEdgeAi/QtEdgeAi>

Example

The following builds a minimal flow: a camera feeds a vision inference step, whose output is parsed into JSON.

QCamera camera;
QMediaCaptureSession session;
session.setCamera(&camera);
camera.start();

auto *videoSource = new QInferenceVideoSource(&session);
auto *detection = new QVisionInference("libgstedgeimpulse.so", QString(), "edgeimpulse");
auto *parser = new QInferenceResultParser;

QInferenceFlow *flow = QInferenceFlow::fromSteps({ videoSource, detection, parser });
QObject::connect(parser, &QInferenceStep::dataAvailable,
                  [](const QVariant &data, const QString &) { qDebug() << data; });
flow->start();

libgstedgeimpulse.so above is not shipped with the module. Two sources are common: a model already optimized for the target hardware, such as a .tflite model from the Qualcomm Intelligent Multimedia SDK's model zoo, or a model trained on your own data through Edge Impulse Studio, which exports it as a compiled GStreamer plugin like the one above. Either way, QVisionInference::model() takes the path to the resulting file, and the model's format decides which backend step provider loads it: .so for Edge Impulse, .tflite for the Qualcomm IM SDK.

Classes

QInferenceBackendDataPort

The abstract base class for backend-specific port implementations

QInferenceBackendFactory

Creates QInferenceBackendStep and QInferenceBackendFlow instances from loaded plugins

QInferenceBackendFlow

The abstract base class for backend-specific pipeline flows

QInferenceBackendStep

The abstract base class for backend-specific pipeline steps

QInferenceDataPort

Represents an input or output of a QInferenceStep through which data flows

QInferenceFlow

Manages a pipeline of data-processing steps and their connections

QInferenceResultParser

Parses JSON data from the pipeline

QInferenceStep

The base class for pipeline steps that produce or consume data

QInferenceVideoSource

Video frames to the pipeline

QVisionInference

Runs AI inference on video frames

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.