I'm trying to run the imageviewer example from this website https://doc.qt.io/qt-5/qtwidgets-widgets-imageviewer-example.html. However, for some reason I don't seem to have QColorSpace. I tried to include all of the possible libraries I thinnk I would need but still have no luck. Is it my CMake file or do I need to somehow install QColorSpace?
cmake_minimum_required(VERSION 3.5)
project(SAT_Solver LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# QtCreator supports the following variables for Android, which are identical to qmake Android variables.
# Check http://doc.qt.io/qt-5/deployment-android.html for more information.
# They need to be set before the find_package(Qt5 ...) call.
#if(ANDROID)
# set(ANDROID_PACKAGE_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/android")
# if (ANDROID_ABI STREQUAL "armeabi-v7a")
# set(ANDROID_EXTRA_LIBS
# ${CMAKE_CURRENT_SOURCE_DIR}/path/to/libcrypto.so
# ${CMAKE_CURRENT_SOURCE_DIR}/path/to/libssl.so)
# endif()
#endif()
find_package(QT NAMES Qt6 Qt5 COMPONENTS Widgets PrintSupport OpenGL Core Gui REQUIRED)
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Widgets PrintSupport OpenGL Core Gui REQUIRED)
if(ANDROID)
add_library(SAT_Solver SHARED
main.cpp
mainwindow.cpp
mainwindow.h
mainwindow.ui
ScribbleArea.cpp
ScribbleArea.h
)
else()
add_executable(SAT_Solver
main.cpp
mainwindow.cpp
mainwindow.h
mainwindow.ui
ScribbleArea.cpp
ScribbleArea.h
imageviewer.h
imageviewer.cpp
)
endif()
#qt5_add_resources(RC_SRC "resources/qml.qrc")
#qt5_add_resources(RC_SRC "/home/nalfredo/School/AutoSoftware/Project/QT/SAT_Solver/Resources.qrc")
target_link_libraries(SAT_Solver PRIVATE Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::PrintSupport
${QT_QTSVG_LIBRARY} Qt${QT_VERSION_MAJOR}::OpenGL Qt${QT_VERSION_MAJOR}::Gui Qt${QT_VERSION_MAJOR}::Core Qt5::Gui)