From 14d10c632bad3346d404271535e6225d226afaa5 Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Fri, 14 Jul 2023 15:37:27 +0800 Subject: 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 --- src/widgets/widgets/qtoolbar.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/widgets/widgets/qtoolbar.cpp') 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 -- cgit v1.2.3