On this page

QVisionInference Class

The QVisionInference class runs AI inference on video frames. More...

Header: #include <QVisionInference>
CMake: find_package(Qt6 REQUIRED COMPONENTS EdgeAi)
target_link_libraries(mytarget PRIVATE Qt6::EdgeAi)
qmake: QT += edgeai
Inherits: QInferenceStep
Status: Technical Preview

Properties

Public Functions

QVisionInference(const QUrl &configFile, const QString &provider, QObject *parent = nullptr)
QUrl configFile() const
QString provider() const

Detailed Description

QVisionInference takes video input and produces structured output, such as classifications or detections. The step provider named by provider reads the model to run, and everything else it needs, from the step's configFile. QInferenceBackendFactory creates the backend step of the step provider, for example Edge Impulse.

See also QInferenceStep, QInferenceVideoSource, QInferenceResultParser, provider, and configFile.

Property Documentation

[read-only] configFile : const QUrl

This property holds the configuration file of the step.

What the file contains, and in which format, depends entirely on the step provider. A step provider that has a configuration file format of its own, such as NVIDIA DeepStream, reads the file with its own parser. The others read a JSON object, use the keys they know, and ignore the rest.

A relative path is resolved against the application's directory, and only local files are supported. The file is given to the constructor, because the backend step reads it during construction.

The default value is an empty URL.

Access functions:

QUrl configFile() const

See also Qt Edge AI Configuration Files.

[read-only] provider : const QString

This property holds the name of the step provider that runs the step.

The name is the one in the JSON metadata of the backend plugin that provides the step provider. QInferenceBackendFactory creates the backend step with that step provider. The name is given to the constructor, because the backend step is created during construction.

The name is required, because the configFile is specific to the step provider that it names. A step with an empty name, or with a name that the backend has no step provider for, gets no backend step, and QInferenceBackendFactory logs a warning.

Access functions:

QString provider() const

Member Function Documentation

[explicit] QVisionInference::QVisionInference(const QUrl &configFile, const QString &provider, QObject *parent = nullptr)

Constructs a QVisionInference that reads its configuration from configFile. provider is the name of the step provider that runs the step, which is the one that configFile is written for. Pass parent to QInferenceStep.

The step provider creates the backend step, which reads configFile, during construction.

See also configFile and provider.

© 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.