Opencv with QT6

I’m trying to include opencv in qt6, but in latest opencv version–> cmakelists: it checks for qt5, and therefore, it could not detect or find my QT6.
Is there any tricks or versions I should know about?
I would really appreciate the help!

@Yousef_Alnaser, not a trick, you can edit .cmake files to use qt6 instead.
You should check if it is compatible with qt5.
Lack of support for qt6 tells me no one did the proper cmake modifications to use qt6 yet.

Hi,
I have the same problem with cmake and qt6. Do you find a solution?

Hi,

seems to be fixed.

I just built OpenCV 4.6.0 with Qt 6.3.1 under Win10 basically following the instructions on https://wiki.qt.io/How_to_setup_Qt_and_openCV_on_Windows by using Qt6_DIR instead of Qt5_DIR during configure.

BR
Christian

PS:
Smoketest of runtime successful with example from link above and slight modifications in the pro-file using the correct dll versions

LIBS += C:\YOURPATH\opencvbuild\install\x64\mingw\bin\libopencv_core460.dll
LIBS += C:\YOURPATH\opencvbuild\install\x64\mingw\bin\libopencv_highgui460.dll
LIBS += C:\YOURPATH\opencvbuild\install\x64\mingw\bin\libopencv_imgcodecs460.dll
LIBS += C:\YOURPATH\opencvbuild\install\x64\mingw\bin\libopencv_imgproc460.dll
LIBS += C:\YOURPATH\opencvbuild\install\x64\mingw\bin\libopencv_features2d460.dll
LIBS += C:\YOURPATH\opencvbuild\install\x64\mingw\bin\libopencv_calib3d460.dll