QtAV icon indicating copy to clipboard operation
QtAV copied to clipboard

Question: Does QtAV work well with Qt 6.x?

Open rpw98 opened this issue 3 years ago • 11 comments

I'm thinking about updating my code from Qt 5.15 to Qt 6.2. But I don't know if QtAV will work with Qt 6.2. Has anyone successfully built QtAV with Qt 6.1/6.2?

Thanks.

rpw98 avatar Oct 08 '21 21:10 rpw98

I'm trying to build QtAV on Qt 6.2, but had no success so far.

nicmorais avatar Dec 23 '21 16:12 nicmorais

You can try https://github.com/wang-bin/mdk-sdk, it's designed to support any app framework, including qt.

wang-bin avatar Jan 08 '22 09:01 wang-bin

With Qt 6.3 compile fails I am using QtAV with qml , is it still wip @wang-bin , I am using cmake build , with qt 5.15 QtAV cmake build is possible both with ninja and make builds .. but wuth Qt6.3 both fail .. any clue ? is it possible to know what optional modules of Qt6 are needed other tthan Multimedia ?

MohammadKanan avatar May 17 '22 19:05 MohammadKanan

My personal feedback : cmake port from qmake is incomplete. Use qmake in all cases.

I'm sure : as QtAV development is stopped since february, i fork the project in digiKam core and review, patch, and improve the implementations. Look the README here for details:

https://invent.kde.org/graphics/digikam/-/tree/master/core/libs/video/qtav

My cmake port is complete. I also fix plenty of static analyzer reports. My code compile under Qt6, but i drop QML as i don't need for digiKam.

Best

Gilles Caulier

cgilles avatar May 18 '22 07:05 cgilles

@cgilles Yes , seems to be the case .. CMakeLists still finding Qt5 modules, still qmake also fails with qt6

MohammadKanan avatar May 18 '22 08:05 MohammadKanan

Note: my port to Qt6 is complete. QtAV original code port to Qt6 was partial. Look weel the README, i explain well all tasks done over QtAV source code.

cgilles avatar May 18 '22 08:05 cgilles

Qt 6.2.4 / qmake failes this error filter/X11FilterContext.cpp:185: error: ‘class QFontMetrics’ has no member named ‘width’ QtAV/src/filter/X11FilterContext.cpp: In member function ‘virtual void QtAV::X11FilterContext::drawPlainText(const QPointF&, const QString&)’:

MohammadKanan avatar May 18 '22 08:05 MohammadKanan

I already fixed the problem:

https://invent.kde.org/graphics/digikam/-/blob/master/core/libs/video/qtav/src/filter/X11FilterContext.cpp#L236

Gilles Caulier

cgilles avatar May 18 '22 08:05 cgilles

@cgilles , thank you unfortunately my primary interest is the QML port , you say its not included in your fix ?

MohammadKanan avatar May 18 '22 09:05 MohammadKanan

With Qt 6.3 compile fails I am using QtAV with qml , is it still wip @wang-bin , I am using cmake build , with qt 5.15 QtAV cmake build is possible both with ninja and make builds .. but wuth Qt6.3 both fail .. any clue ? is it possible to know what optional modules of Qt6 are needed other tthan Multimedia ?

Won't support qt6 qml because qt6 turns to use rhi instead of opengl. Rewritting the whole rendering code is required to support rhi. You can try this https://github.com/wang-bin/mdk-examples/tree/master/Qt/qmlrhi

wang-bin avatar May 18 '22 09:05 wang-bin

yes, with digiKam , we don't use QML code in favor of C++, for speed reasons, and to be homogeneous, as digiKam is more than 1.5 M C++ code lines.

But you can backport my fixes in a personal QtAV port including original QML code, with your fixes for these implementations.

Gilles Caulier

cgilles avatar May 18 '22 09:05 cgilles