'QAbstractVideoSurface file not found

So I've installed QtMultimedia and in the picture, you can see all the modules installed.

my components

Then I added modules to my project's qmake

QT += multimedia
QT += multimediawidgets

And I can easily use stuff like QVideoWidget or QMediaPlayer and it compiles. But including QAbstractVideoSurface doesn't work!

#include <QAbstractVideoSurface>     //file not found

I've tried updating components and installing Qt 6.3.0, but the result is the same.

What module did I miss or maybe it's a bug?



Solution 1:[1]

In Qt 6.0.0 and higher versions:

QAbstractVideoSurface has been replaced by the QVideoSink class, and generic rendering support has been enhanced to cover all pixel formats supported by Qt Multimedia.

please read Changes to Qt Multimedia.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Parisa.H.R