summaryrefslogtreecommitdiffstats
path: root/examples/charts/selectedbar/CMakeLists.txt
diff options
context:
space:
mode:
authorAndrii Staikov <andrii.staikov@scythe-studio.com>2021-06-27 00:20:47 +0200
committerAndrii Staikov <andrii.staikov@scythe-studio.com>2021-08-30 12:18:07 +0200
commit72d69b22d8da004fcb27e1a549cdda3f52b9c4af (patch)
tree8106459ad33cbfe9ea28e80963ec0b4e54ca5c61 /examples/charts/selectedbar/CMakeLists.txt
parent6dc4b8457ce1f49c761dda5ed13d5165e64a9b81 (diff)
Add bar chart example
Example shows using setBarSelected(). Selecting bars changes their color and information of selected/unselected bars. [QtCharts][Example] Added Example Task-number: QTBUG-89445 Pick-to: 6.2 Change-Id: Ic863e763d2cfa552629f42afd1232c1f77b95e95 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Diffstat (limited to 'examples/charts/selectedbar/CMakeLists.txt')
-rw-r--r--examples/charts/selectedbar/CMakeLists.txt40
1 files changed, 40 insertions, 0 deletions
diff --git a/examples/charts/selectedbar/CMakeLists.txt b/examples/charts/selectedbar/CMakeLists.txt
new file mode 100644
index 00000000..55542a42
--- /dev/null
+++ b/examples/charts/selectedbar/CMakeLists.txt
@@ -0,0 +1,40 @@
+# Generated from selectedbar.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(selectedbar LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/charts/selectedbar")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Charts)
+
+qt_add_executable(selectedbar
+ utilities.h utilities.cpp
+ main.cpp
+)
+set_target_properties(selectedbar PROPERTIES
+ WIN32_EXECUTABLE TRUE
+ MACOSX_BUNDLE TRUE
+)
+target_link_libraries(selectedbar PUBLIC
+ Qt::Charts
+ Qt::Core
+ Qt::Gui
+)
+
+install(TARGETS selectedbar
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)