mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2024-11-15 05:05:43 +08:00
Fixed issue #654 - Wheel event on DockAreaTabBar
This commit is contained in:
parent
04f6d9168e
commit
5edbcc1970
@ -473,6 +473,15 @@ bool CDockAreaTabBar::eventFilter(QObject *watched, QEvent *event)
|
||||
updateGeometry();
|
||||
break;
|
||||
|
||||
// Manage wheel event
|
||||
case QEvent::Wheel:
|
||||
// Ignore wheel events if tab is currently dragged
|
||||
if (Tab->dragState() == DraggingInactive)
|
||||
{
|
||||
wheelEvent((QWheelEvent* )event);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -34,7 +34,6 @@
|
||||
|
||||
#include <QStackedLayout>
|
||||
#include <QScrollBar>
|
||||
#include <QWheelEvent>
|
||||
#include <QStyle>
|
||||
#include <QPushButton>
|
||||
#include <QDebug>
|
||||
|
@ -789,6 +789,13 @@ bool CDockWidgetTab::event(QEvent *e)
|
||||
}
|
||||
|
||||
|
||||
//============================================================================
|
||||
eDragState CDockWidgetTab::dragState() const
|
||||
{
|
||||
return d->DragState;
|
||||
}
|
||||
|
||||
|
||||
//============================================================================
|
||||
void CDockWidgetTab::onDockWidgetFeaturesChanged()
|
||||
{
|
||||
|
@ -178,6 +178,12 @@ public:
|
||||
*/
|
||||
void setIconSize(const QSize& Size);
|
||||
|
||||
/**
|
||||
* Returns the current drag state of this tab.
|
||||
* Use this function to determine if the tab is currently being dragged
|
||||
*/
|
||||
eDragState dragState() const;
|
||||
|
||||
public Q_SLOTS:
|
||||
virtual void setVisible(bool visible) override;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user