diff --git a/src/private/quick/qml/Frame.qml b/src/private/quick/qml/Frame.qml index e51769f3..2ebd373b 100644 --- a/src/private/quick/qml/Frame.qml +++ b/src/private/quick/qml/Frame.qml @@ -21,6 +21,7 @@ Rectangle { readonly property int nonContentsHeight: titleBar.heightWhenVisible + tabbar.height property int contentsMargin: 2 property int titleBarContentsMargin: 1 + properby bool hasCustomMouseEventRedirector: false anchors.fill: parent @@ -108,7 +109,8 @@ Rectangle { onTabBarCppChanged: { if (tabBarCpp) { - tabBarCpp.redirectMouseEvents(dragMouseArea) + if (!root.hasCustomMouseEventRedirector) + tabBarCpp.redirectMouseEvents(dragMouseArea) // Setting just so the unit-tests can access the buttons tabBarCpp.tabBarQmlItem = this; diff --git a/src/private/quick/qml/TitleBarBase.qml b/src/private/quick/qml/TitleBarBase.qml index f7466e75..ab7f78dd 100644 --- a/src/private/quick/qml/TitleBarBase.qml +++ b/src/private/quick/qml/TitleBarBase.qml @@ -36,6 +36,9 @@ Rectangle { /// Don't set 'hight' directly in the overridden component property int heightWhenVisible: 30 + /// Set to true if you're using a custom MouseEventRedirector in your code + property bool hasCustomMouseEventRedirector: false + /// @brief Signal emitted by a TitleBar.qml component when the close button is clicked signal closeButtonClicked(); @@ -58,7 +61,8 @@ Rectangle { onTitleBarCppChanged: { if (titleBarCpp) { - titleBarCpp.redirectMouseEvents(dragMouseArea) + if (!root.hasCustomMouseEventRedirector) + titleBarCpp.redirectMouseEvents(dragMouseArea) // Setting just so the unit-tests can access the buttons titleBarCpp.titleBarQmlItem = this;