diff options
Diffstat (limited to 'src/gui/kernel/qaction.cpp')
-rw-r--r-- | src/gui/kernel/qaction.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/gui/kernel/qaction.cpp b/src/gui/kernel/qaction.cpp index 0f389789a1..1768cd8aa1 100644 --- a/src/gui/kernel/qaction.cpp +++ b/src/gui/kernel/qaction.cpp @@ -171,9 +171,7 @@ QObject *QActionPrivate::menu() const Once a QAction has been created, it should be added to the relevant menu and toolbar, then connected to the slot which will perform - the action. For example: - - \snippet ../widgets/mainwindows/application/mainwindow.cpp 19 + the action. Actions are added to widgets using QWidget::addAction() or QGraphicsWidget::addAction(). Note that an action must be added to a @@ -186,7 +184,7 @@ QObject *QActionPrivate::menu() const use as menu items. - \sa QMenu, QToolBar, {Qt Widgets - Application Example} + \sa QMenu, QToolBar */ /*! @@ -540,8 +538,10 @@ QList<QObject*> QAction::associatedObjects() const \brief the action's icon In toolbars, the icon is used as the tool button icon; in menus, - it is displayed to the left of the menu text. There is no default - icon. + it is displayed to the left of the menu text, as long as + QAction::iconVisibleInMenu returns \c true. + + There is no default icon. If a null icon (QIcon::isNull()) is passed into this function, the icon of the action is cleared. @@ -1317,8 +1317,6 @@ Q_GUI_EXPORT QDebug operator<<(QDebug d, const QAction *action) QtDebugUtils::formatQEnum(d, action->menuRole()); d << " enabled=" << action->isEnabled(); d << " visible=" << action->isVisible(); - } else { - d << '0'; } d << ')'; return d; |