Details
-
Bug
-
Resolution: Invalid
-
P3: Somewhat important
-
None
-
5.2.0, 5.2.1
-
None
Description
When switching to a new Tab of the TabView, the containsMouse property of a child mouseArea is not updated initially. You have to move the mouse in order to update the flag. The following code will reproduce the problem.
import QtQuick 2.2 import QtQuick.Controls 1.1 import QtTest 1.0 Item{ id: root width: 256 height: 256 TabView { id: tabView anchors.fill: parent Tab {} Tab { id: tab2 MouseArea { hoverEnabled: true } } } TestCase { when: windowShown function test_containsMouse() { mouseMove(root, 128, 128); tabView.currentIndex = 1; // bug: tab2 is shown, but containsMouse is not updated verify(!tab2.item.containsMouse); // <- BUG: passes, but should fail! // only after moving the mouse, containsMouse is updated mouseMove(root, 129, 128); verify(tab2.item.containsMouse); } } }
Attachments
Issue Links
- relates to
-
QTBUG-42194 Provide a way to force re-evaluation of MouseArea's containsMouse property
-
- Closed
-