diff options
Diffstat (limited to 'tools/designer/src/lib/shared/qdesigner_toolbar.cpp')
-rw-r--r-- | tools/designer/src/lib/shared/qdesigner_toolbar.cpp | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/tools/designer/src/lib/shared/qdesigner_toolbar.cpp b/tools/designer/src/lib/shared/qdesigner_toolbar.cpp index 0bb91ee..898be1e 100644 --- a/tools/designer/src/lib/shared/qdesigner_toolbar.cpp +++ b/tools/designer/src/lib/shared/qdesigner_toolbar.cpp @@ -440,18 +440,14 @@ QAction *ToolBarEventFilter::actionAt(const QToolBar *tb, const QPoint &pos) return tb->actions().at(index); } +//that's a trick to get acces to the initStyleOption which is a protected member +class FriendlyToolBar : public QToolBar { +public: + friend class ToolBarEventFilter; +}; + QRect ToolBarEventFilter::handleArea(const QToolBar *tb) { - //that's a trick to get acces to the initStyleOption which is a protected member - class FriendlyToolBar : public QToolBar - { - public: -#ifdef Q_NO_USING_KEYWORD - void initStyleOption(QStyleOptionToolBar *option) { QToolBar::initStyleOption(option); } -#else - using QToolBar::initStyleOption; -#endif - }; QStyleOptionToolBar opt; static_cast<const FriendlyToolBar*>(tb)->initStyleOption(&opt); return tb->style()->subElementRect(QStyle::SE_ToolBarHandle, &opt, tb); |