Move anchor layout example to manual tests
Pick-to: 6.5 6.5.0 Change-Id: I9c9a9dbcdaf705a31208b80b71e978938a492142 Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
This commit is contained in:
parent
cd0301a78e
commit
5773c3ac28
@ -137,7 +137,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" \
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 24 KiB |
@ -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}
|
||||
*/
|
@ -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)
|
||||
|
@ -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}"
|
||||
)
|
@ -8,7 +8,6 @@ SUBDIRS = \
|
||||
diagramscene \
|
||||
dragdroprobot \
|
||||
flowlayout \
|
||||
anchorlayout \
|
||||
simpleanchorlayout
|
||||
|
||||
contains(DEFINES, QT_NO_CURSOR)|!qtConfig(draganddrop): SUBDIRS -= dragdroprobot
|
||||
|
17
tests/manual/qgraphicslayout/anchorlayout/CMakeLists.txt
Normal file
17
tests/manual/qgraphicslayout/anchorlayout/CMakeLists.txt
Normal file
@ -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
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user