Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
5.6.1
-
None
-
Ubuntu 16.04 64bit
-
f27534158 (dev), da9da78ad (6.8), b17703171 (dev), 0f46d3fa7 (6.7)
Description
1. Create QTabWidget
2. Add two tabs - with QGraphicsView and empty.
3. Hide the QTabWidget, the QGraphicsView will receives QEvent::Hide and send event to a QGraphicsScene:
case QEvent::Hide:
// spontaneous event will generate a WindowDeactivate.
if (!event->spontaneous() && d->scene && isActiveWindow())
break;
....
case QEvent::WindowDeactivate:
if (!-d>activationRefCount) {
Here activationRefCount will equal to 0.
4. Change current tab from scene to another. QGraphicsView will receives QEvent::Hide again. So activationRefCount will equal to -1.
5. Make QTabWidget visible.
6. Switch to tab with the QGraphicsView - it will receives QEvent::Show event and activationRefCount will equal to 0. But that's wrong - because we have active tab with the scene.
Please see screencast: https://www.youtube.com/watch?v=dU3eG94XUQ8
(sorry for my English).
Attachments
For Gerrit Dashboard: QTBUG-53974 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
567358,2 | QGraphicsView: add a failing test | dev | qt/qtbase | Status: MERGED | +2 | +1 |
567359,3 | QWidget: do not send hide events to hidden children | dev | qt/qtbase | Status: MERGED | +2 | +1 |
567433,2 | QGraphicsView: add a failing test | 6.8 | qt/qtbase | Status: MERGED | +2 | 0 |
567471,2 | QGraphicsView: add a failing test | 6.7 | qt/qtbase | Status: MERGED | +2 | 0 |
570734,1 | QGraphicsView: add a failing test | tqtc/lts-6.5 | qt/tqtc-qtbase | Status: ABANDONED | +2 | 0 |