diff --git a/doc/global/manifest-meta.qdocconf b/doc/global/manifest-meta.qdocconf index a57946dd6e6..872ff46d05a 100644 --- a/doc/global/manifest-meta.qdocconf +++ b/doc/global/manifest-meta.qdocconf @@ -179,7 +179,6 @@ manifestmeta.ios.names = "QtCore/Contiguous Cache Example" \ "QtWidgets/Blur Picker Effect Example" \ "QtWidgets/Fade Message Effect Example" \ "QtWidgets/Lighting Effect Example" \ - "QtWidgets/Anchor Layout Example" \ "QtWidgets/Basic Graphics Layouts Example" \ "QtWidgets/40000 Chips" \ "QtWidgets/Colliding Mice Example" \ diff --git a/examples/widgets/doc/images/graphicsanchorlayout-example.png b/examples/widgets/doc/images/graphicsanchorlayout-example.png deleted file mode 100644 index 3f35fdb6b77..00000000000 Binary files a/examples/widgets/doc/images/graphicsanchorlayout-example.png and /dev/null differ diff --git a/examples/widgets/doc/src/graphicsview-anchorlayout.qdoc b/examples/widgets/doc/src/graphicsview-anchorlayout.qdoc deleted file mode 100644 index ec74367f9ba..00000000000 --- a/examples/widgets/doc/src/graphicsview-anchorlayout.qdoc +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only - -/*! - \example graphicsview/anchorlayout - \title Anchor Layout Example - \ingroup examples-graphicsview-layout - \brief Demonstrates anchor layout in a graphics view scene. - - The Anchor Layout example demonstrates the use of the QGraphicsAnchorLayout - class. - - \image graphicsanchorlayout-example.png - - The basic steps of this example are: - \list - \li Create a QGraphicsScene - \li Create widgets - \li Create a QGraphicsAnchorLayout - \li Create a QGraphicsWidget - \li Add vertical and horizontal anchors between the widgets - \li View the scene with a QGraphicsView object - \endlist - - \section1 Creating a QGraphicsScene - - \quotefromfile graphicsview/anchorlayout/main.cpp - \skipto QGraphicsScene - \printuntil setSceneRect - - \section1 Creating Widgets - - \skipto QGraphicsProxyWidget - \printuntil *g - - \section1 Creating a Layout - - \skipto QGraphicsAnchorLayout - \printuntil l->setSpacing - - \section1 Creating a QGraphicsWidget - - \skipto QGraphicsWidget - \printuntil setLayout(l) - - \section1 Adding Anchors - - \skipto vertical - \printuntil l->addAnchor(f, Qt::AnchorRight - - \section1 Viewing the Scene with QGraphicsView - - \skipto scene.addItem - \printuntil view.show - - \sa {Simple Anchor Layout Example} -*/ diff --git a/examples/widgets/graphicsview/CMakeLists.txt b/examples/widgets/graphicsview/CMakeLists.txt index 496d2179bb3..e0d291312e7 100644 --- a/examples/widgets/graphicsview/CMakeLists.txt +++ b/examples/widgets/graphicsview/CMakeLists.txt @@ -8,7 +8,6 @@ qt_internal_add_example(collidingmice) qt_internal_add_example(basicgraphicslayouts) qt_internal_add_example(diagramscene) qt_internal_add_example(flowlayout) -qt_internal_add_example(anchorlayout) qt_internal_add_example(simpleanchorlayout) if(QT_FEATURE_cursor AND QT_FEATURE_draganddrop) qt_internal_add_example(dragdroprobot) diff --git a/examples/widgets/graphicsview/anchorlayout/CMakeLists.txt b/examples/widgets/graphicsview/anchorlayout/CMakeLists.txt deleted file mode 100644 index 73197b56ddb..00000000000 --- a/examples/widgets/graphicsview/anchorlayout/CMakeLists.txt +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright (C) 2022 The Qt Company Ltd. -# SPDX-License-Identifier: BSD-3-Clause - -cmake_minimum_required(VERSION 3.16) -project(anchorlayout LANGUAGES CXX) - -if(NOT DEFINED INSTALL_EXAMPLESDIR) - set(INSTALL_EXAMPLESDIR "examples") -endif() - -set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/anchorlayout") - -find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) - -qt_standard_project_setup() - -qt_add_executable(anchorlayout - main.cpp -) - -set_target_properties(anchorlayout PROPERTIES - WIN32_EXECUTABLE TRUE - MACOSX_BUNDLE TRUE -) - -target_link_libraries(anchorlayout PRIVATE - Qt6::Core - Qt6::Gui - Qt6::Widgets -) - -install(TARGETS anchorlayout - RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" - BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" - LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" -) diff --git a/examples/widgets/graphicsview/graphicsview.pro b/examples/widgets/graphicsview/graphicsview.pro index 218ee991ce1..b3e49050ba8 100644 --- a/examples/widgets/graphicsview/graphicsview.pro +++ b/examples/widgets/graphicsview/graphicsview.pro @@ -8,7 +8,6 @@ SUBDIRS = \ diagramscene \ dragdroprobot \ flowlayout \ - anchorlayout \ simpleanchorlayout contains(DEFINES, QT_NO_CURSOR)|!qtConfig(draganddrop): SUBDIRS -= dragdroprobot diff --git a/tests/manual/qgraphicslayout/anchorlayout/CMakeLists.txt b/tests/manual/qgraphicslayout/anchorlayout/CMakeLists.txt new file mode 100644 index 00000000000..13331a74a80 --- /dev/null +++ b/tests/manual/qgraphicslayout/anchorlayout/CMakeLists.txt @@ -0,0 +1,17 @@ +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + +##################################################################### +## anchorlayout Binary: +##################################################################### +cmake_minimum_required(VERSION 3.16) + +qt_internal_add_manual_test(anchorlayout + GUI + SOURCES + main.cpp + LIBRARIES + Qt::Gui + Qt::Widgets +) + diff --git a/examples/widgets/graphicsview/anchorlayout/anchorlayout.pro b/tests/manual/qgraphicslayout/anchorlayout/anchorlayout.pro similarity index 100% rename from examples/widgets/graphicsview/anchorlayout/anchorlayout.pro rename to tests/manual/qgraphicslayout/anchorlayout/anchorlayout.pro diff --git a/examples/widgets/graphicsview/anchorlayout/main.cpp b/tests/manual/qgraphicslayout/anchorlayout/main.cpp similarity index 100% rename from examples/widgets/graphicsview/anchorlayout/main.cpp rename to tests/manual/qgraphicslayout/anchorlayout/main.cpp