aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quickcontrols/attachedstyleproperties/MyStyle
diff options
context:
space:
mode:
Diffstat (limited to 'examples/quickcontrols/attachedstyleproperties/MyStyle')
-rw-r--r--examples/quickcontrols/attachedstyleproperties/MyStyle/CMakeLists.txt22
-rw-r--r--examples/quickcontrols/attachedstyleproperties/MyStyle/Label.qml3
-rw-r--r--examples/quickcontrols/attachedstyleproperties/MyStyle/Popup.qml3
-rw-r--r--examples/quickcontrols/attachedstyleproperties/MyStyle/mystyle.cpp2
4 files changed, 15 insertions, 15 deletions
diff --git a/examples/quickcontrols/attachedstyleproperties/MyStyle/CMakeLists.txt b/examples/quickcontrols/attachedstyleproperties/MyStyle/CMakeLists.txt
index 9cb00a81e7..0ff17420b9 100644
--- a/examples/quickcontrols/attachedstyleproperties/MyStyle/CMakeLists.txt
+++ b/examples/quickcontrols/attachedstyleproperties/MyStyle/CMakeLists.txt
@@ -2,8 +2,6 @@ if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
message(FATAL_ERROR "MyStyle should be built as part of the 'attachedstyleproperties' project, and not in isolation.")
endif()
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/quickcontrols/attachedstyleproperties")
-
qt_policy(SET QTP0001 NEW)
qt_add_qml_module(MyStyle
URI MyStyle
@@ -28,18 +26,22 @@ generate_export_header(MyStyle)
find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml QuickControls2)
target_link_libraries(MyStyle PRIVATE
- Qt::Core
- Qt::Gui
- Qt::Qml
- Qt::QuickControls2
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Qml
+ Qt6::QuickControls2
)
install(TARGETS MyStyle
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION .
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
+install(TARGETS MyStyleplugin
+ RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}/MyStyle"
+ LIBRARY DESTINATION "${CMAKE_INSTALL_BINDIR}/MyStyle"
+)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/qmldir
- DESTINATION "${INSTALL_EXAMPLEDIR}"
+ DESTINATION "${CMAKE_INSTALL_BINDIR}/MyStyle"
)
diff --git a/examples/quickcontrols/attachedstyleproperties/MyStyle/Label.qml b/examples/quickcontrols/attachedstyleproperties/MyStyle/Label.qml
index 3d045aa70e..202528a732 100644
--- a/examples/quickcontrols/attachedstyleproperties/MyStyle/Label.qml
+++ b/examples/quickcontrols/attachedstyleproperties/MyStyle/Label.qml
@@ -1,7 +1,6 @@
-// Copyright (C) 2022 The Qt Company Ltd.
+// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick
import QtQuick.Templates as T
import MyStyle
diff --git a/examples/quickcontrols/attachedstyleproperties/MyStyle/Popup.qml b/examples/quickcontrols/attachedstyleproperties/MyStyle/Popup.qml
index 0f5e753f60..25c4ace64a 100644
--- a/examples/quickcontrols/attachedstyleproperties/MyStyle/Popup.qml
+++ b/examples/quickcontrols/attachedstyleproperties/MyStyle/Popup.qml
@@ -1,6 +1,7 @@
-// Copyright (C) 2022 The Qt Company Ltd.
+// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+pragma ComponentBehavior: Bound
import QtQuick
import QtQuick.Templates as T
import MyStyle
diff --git a/examples/quickcontrols/attachedstyleproperties/MyStyle/mystyle.cpp b/examples/quickcontrols/attachedstyleproperties/MyStyle/mystyle.cpp
index 40f7af702e..feadb138f7 100644
--- a/examples/quickcontrols/attachedstyleproperties/MyStyle/mystyle.cpp
+++ b/examples/quickcontrols/attachedstyleproperties/MyStyle/mystyle.cpp
@@ -108,8 +108,6 @@ QColor MyStyle::toolBarColor() const
QColor MyStyle::popupColor() const
{
-// const QColor winColor = windowColor();
-// return m_theme == Light ? winColor.darker(120) : winColor.lighter(120);
return windowColor().lighter(120);
}