Qt5Compat not installed
-
wrote on 18 Mar 2021, 18:35 last edited by chairman
I want to use QtGraphicalEffects in qt6 by ```
import Qt5Compat.QtGraphicalEffectsAm getting Qt5Compat not installed error. From installation folder Qt5Compat is already installed.
-
wrote on 19 Mar 2021, 01:01 last edited by
@chairman
As per Qt Docs import statementimport Qt5Compat.GraphicalEffects
https://doc-snapshots.qt.io/qt6-dev/graphicaleffects5.html
in order to link against the module in cmake
find_package(Qt6 COMPONENTS Core5Compat REQUIRED)
target_link_libraries(mytarget PUBLIC Qt6::Core5Compat)
https://doc.qt.io/qt-6/qtcore5-index.html -
Pleas re-read your post and ask yourself if someone without your own knowledge can really understand what your problem is.
-
wrote on 19 Mar 2021, 01:01 last edited by
@chairman
As per Qt Docs import statementimport Qt5Compat.GraphicalEffects
https://doc-snapshots.qt.io/qt6-dev/graphicaleffects5.html
in order to link against the module in cmake
find_package(Qt6 COMPONENTS Core5Compat REQUIRED)
target_link_libraries(mytarget PUBLIC Qt6::Core5Compat)
https://doc.qt.io/qt-6/qtcore5-index.html -
@chairman
As per Qt Docs import statementimport Qt5Compat.GraphicalEffects
https://doc-snapshots.qt.io/qt6-dev/graphicaleffects5.html
in order to link against the module in cmake
find_package(Qt6 COMPONENTS Core5Compat REQUIRED)
target_link_libraries(mytarget PUBLIC Qt6::Core5Compat)
https://doc.qt.io/qt-6/qtcore5-index.html -
@nagesh it seems like this is supposed to be added in C++ main file but am using qt for python. Correct me if am wrong. If so where specific am I supposed to add this. Thank you.
wrote on 19 Mar 2021, 06:47 last edited by@chairman I feel import statement is part of qml file
import Qt5Compat.GraphicalEffectsAnd CMakeLists.txt
find_package(Qt6 COMPONENTS Core5Compat REQUIRED)
target_link_libraries(mytarget PUBLIC Qt6::Core5Compat)Not sure about qt for python
-
wrote on 19 Mar 2021, 08:14 last edited by
Thanks, it worked with C++ by adding below line
in project.pro, unfortunately python project don't create this file.
But incase anyone else has a python workaround please share.QT += core5compat
4/6