diff options
Diffstat (limited to 'src/widgets/widgets/qtoolbar.cpp')
-rw-r--r-- | src/widgets/widgets/qtoolbar.cpp | 40 |
1 files changed, 9 insertions, 31 deletions
diff --git a/src/widgets/widgets/qtoolbar.cpp b/src/widgets/widgets/qtoolbar.cpp index 4af71c126e..bcf5a40ae3 100644 --- a/src/widgets/widgets/qtoolbar.cpp +++ b/src/widgets/widgets/qtoolbar.cpp @@ -799,18 +799,6 @@ QAction *QToolBar::addAction(const QIcon &icon, const QString &text, return action; } -/*!\fn template<typename PointerToMemberFunction> QAction *QToolBar::addAction(const QString &text, const QObject *receiver, PointerToMemberFunction method) - - \since 5.6 - - \overload - - Creates a new action with the given \a text. This action is added to - the end of the toolbar. The action's - \l{QAction::triggered()}{triggered()} signal is connected to the - \a method of the \a receiver. -*/ - /*!\fn template<typename Functor> QAction *QToolBar::addAction(const QString &text, Functor functor) \since 5.6 @@ -829,24 +817,13 @@ QAction *QToolBar::addAction(const QIcon &icon, const QString &text, \overload - Creates a new action with the given \a text. This action is added to - the end of the toolbar. The action's + Creates a new action with the given \a text. This action is added + to the end of the toolbar. The action's \l{QAction::triggered()}{triggered()} signal is connected to the - \a functor. - - If \a context is destroyed, the functor will not be called. -*/ - -/*!\fn template<typename PointerToMemberFunction> QAction *QToolBar::addAction(const QIcon &icon, const QString &text, const QObject *receiver, PointerToMemberFunction method) - - \since 5.6 + \a functor. The \a functor can be a pointer to a member function + in the \a context object. - \overload - - Creates a new action with the given \a icon and \a text. This - action is added to the end of the toolbar. The action's - \l{QAction::triggered()}{triggered()} signal is connected to the - \a method of the \a receiver. + If the \a context object is destroyed, the \a functor will not be called. */ /*!\fn template<typename Functor> QAction *QToolBar::addAction(const QIcon &icon, const QString &text, Functor functor) @@ -870,9 +847,10 @@ QAction *QToolBar::addAction(const QIcon &icon, const QString &text, Creates a new action with the given \a icon and \a text. This action is added to the end of the toolbar. The action's \l{QAction::triggered()}{triggered()} signal is connected to the - \a functor. + \a functor. The \a functor can be a pointer to a member function + of the \a context object. - If \a context is destroyed, the functor will not be called. + If the \a context object is destroyed, the \a functor will not be called. */ /*! @@ -1067,7 +1045,7 @@ void QToolBar::paintEvent(QPaintEvent *) if (d->layout->expanded || d->layout->animating || isWindow()) { //if the toolbar is expended, we need to fill the background with the window color //because some styles may expects that. - p.fillRect(opt.rect, palette().background()); + p.fillRect(opt.rect, palette().window()); style->drawControl(QStyle::CE_ToolBar, &opt, &p, this); style->drawPrimitive(QStyle::PE_FrameMenu, &opt, &p, this); } else { |