diff options
author | Mitch Curtis <mitch.curtis@qt.io> | 2023-07-14 15:37:27 +0800 |
---|---|---|
committer | Mitch Curtis <mitch.curtis@qt.io> | 2023-07-19 10:23:38 +0800 |
commit | 14d10c632bad3346d404271535e6225d226afaa5 (patch) | |
tree | dffc83d6efafdedc0f1129fc682ba329b6118ba3 /src/widgets/widgets/qtoolbar.cpp | |
parent | 4f9c66131d6bd4c61ef59d749ed2ec0ce402c409 (diff) |
Doc: explain how to create a QToolBar
Surprisingly, this wasn't mentioned in the detailed description at all.
Users would need to click on the link for the example in the "See also"
section and then read through it to find any mention of how tool bars
are created.
Pick-to: 6.2 6.5 6.6
Change-Id: I9db23b475009072f34defab38b6d6200a45f2f35
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/widgets/widgets/qtoolbar.cpp')
-rw-r--r-- | src/widgets/widgets/qtoolbar.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/widgets/widgets/qtoolbar.cpp b/src/widgets/widgets/qtoolbar.cpp index ff656e5891..c2def3c6d4 100644 --- a/src/widgets/widgets/qtoolbar.cpp +++ b/src/widgets/widgets/qtoolbar.cpp @@ -389,6 +389,10 @@ void QToolBarPrivate::plug(const QRect &r) \ingroup mainwindow-classes \inmodule QtWidgets + A toolbar is typically created by calling + \l QMainWindow::addToolBar(const QString &title), but it can also + be added as the first widget in a QVBoxLayout, for example. + Toolbar buttons are added by adding \e actions, using addAction() or insertAction(). Groups of buttons can be separated using addSeparator() or insertSeparator(). If a toolbar button is not |