summaryrefslogtreecommitdiffstats
path: root/examples/widgets/doc
diff options
context:
space:
mode:
authorMohammadHossein Qanbari <mohammad.qanbari@qt.io>2024-01-04 14:03:46 +0100
committerMohammadHossein Qanbari <mohammad.qanbari@qt.io>2024-04-18 20:11:14 +0200
commitf371f8a64dc76ec9ff07b666577b7ab47b69751d (patch)
tree1eea7145329d55099852f78b0cf3c327e30eb55c /examples/widgets/doc
parent2d2fae48637d0aaa77cdd7dd413c40efec27a8a5 (diff)
Convert Group Box Example to snippets and screenshots
Remove the Group Box Example from the repository, eliminating the associated example codes, screenshot, and documentation file. The only relevant portion used in the QGroupBox class has been relocated to the existing snippet file. Additionally, all references to this example across other files have been removed. Fixes: QTBUG-119980 Pick-to: 6.7 6.6 Change-Id: I66f9dd9dab1fe64f2d20424af3acd135201827d2 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Diffstat (limited to 'examples/widgets/doc')
-rw-r--r--examples/widgets/doc/src/groupbox.qdoc117
1 files changed, 0 insertions, 117 deletions
diff --git a/examples/widgets/doc/src/groupbox.qdoc b/examples/widgets/doc/src/groupbox.qdoc
deleted file mode 100644
index aa339098ab..0000000000
--- a/examples/widgets/doc/src/groupbox.qdoc
+++ /dev/null
@@ -1,117 +0,0 @@
-// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
-
-/*!
- \example widgets/groupbox
- \title Group Box Example
- \examplecategory {User Interface Components}
- \ingroup examples-widgets
- \brief The Group Box example shows how to use the different kinds of group
- boxes in Qt.
-
- Group boxes are container widgets that organize buttons into groups,
- both logically and on screen. They manage the interactions between
- the user and the application so that you do not have to enforce
- simple constraints.
-
- Group boxes are usually used to organize check boxes and radio
- buttons into exclusive groups.
-
- \borderedimage groupbox-example.png
-
- The Group Boxes example consists of a single \c Window class that
- is used to show four group boxes: an exclusive radio button group,
- a non-exclusive checkbox group, an exclusive radio button group
- with an enabling checkbox, and a group box with normal push buttons.
-
- \section1 Window Class Definition
-
- The \c Window class is a subclass of \c QWidget that is used to
- display a number of group boxes. The class definition contains
- functions to construct each group box and populate it with different
- selections of button widgets:
-
- \snippet widgets/groupbox/window.h 0
-
- In the example, the widget will be used as a top-level window, so
- the constructor is defined so that we do not have to specify a parent
- widget.
-
- \section1 Window Class Implementation
-
- The constructor creates a grid layout and fills it with each of the
- group boxes that are to be displayed:
-
- \snippet widgets/groupbox/window.cpp 0
-
- The functions used to create each group box each return a
- QGroupBox to be inserted into the grid layout.
-
- \snippet widgets/groupbox/window.cpp 1
-
- The first group box contains and manages three radio buttons. Since
- the group box contains only radio buttons, it is exclusive by
- default, so only one radio button can be checked at any given time.
- We check the first radio button to ensure that the button group
- contains one checked button.
-
- \snippet widgets/groupbox/window.cpp 3
-
- We use a vertical layout within the group box to present the
- buttons in the form of a vertical list, and return the group
- box to the constructor.
-
- The second group box is itself checkable, providing a convenient
- way to disable all the buttons inside it. Initially, it is
- unchecked, so the group box itself must be checked before any of
- the radio buttons inside can be checked.
-
- \snippet widgets/groupbox/window.cpp 4
-
- The group box contains three exclusive radio buttons, and an
- independent checkbox. For consistency, one radio button must be
- checked at all times, so we ensure that the first one is initially
- checked.
-
- \snippet widgets/groupbox/window.cpp 5
-
- The buttons are arranged in the same way as those in the first
- group box.
-
- \snippet widgets/groupbox/window.cpp 6
-
- The third group box is constructed with a "flat" style that is
- better suited to certain types of dialog.
-
- \snippet widgets/groupbox/window.cpp 7
-
- This group box contains only checkboxes, so it is non-exclusive by
- default. This means that each checkbox can be checked independently
- of the others.
-
- \snippet widgets/groupbox/window.cpp 8
-
- Again, we use a vertical layout within the group box to present
- the buttons in the form of a vertical list.
-
- \snippet widgets/groupbox/window.cpp 9
-
- The final group box contains only push buttons and, like the
- second group box, it is checkable.
-
- \snippet widgets/groupbox/window.cpp 10
-
- We create a normal button, a toggle button, and a flat push button:
-
- \snippet widgets/groupbox/window.cpp 11
-
- Push buttons can be used to display popup menus. We create one, and
- attach a simple menu to it:
-
- \snippet widgets/groupbox/window.cpp 12
-
- Finally, we lay out the widgets vertically, and return the group box
- that we created:
-
- \snippet widgets/groupbox/window.cpp 13
-*/