Details
-
Bug
-
Resolution: Fixed
-
P3: Somewhat important
-
5.3.1, 5.12, 6.6
-
Mac OS X 10.8.5
-
-
189f9873a (dev), d6cc0fbd5 (6.6), cd8f7a761 (tqtc/lts-6.5)
Description
On the Mac, calling QApplication::widgetAt() with a point over a Qt::Tool widget with WA_TransparentForMouseEvents attribute set doesn't properly return the widget underneath it. Instead it returns null. On Windows, this works as expected by returning the widget underneath the tool widget.
QApplication::widgetAt() uses a mask to cut a hole in the widget for the cursor point and tries calling widgetAt() again with the mask applied. This doesn't appear to work properly on the Mac and ultimately returns null. In general, cutting a hole using a mask on the Mac does work as shown in the attached test app but is not working as desired in widgetAt().
I've attached a sample app that shows the problem. See the source code for details.
For context, I am using a widget with the Qt::Tool flag as a custom drag and drop feedback widget. However, this bug prevents me from determining the appropriate widget beneath the Qt::Tool widget to perform the drop on.
Attachments
Issue Links
- replaces
-
QTBUG-119092 [REG: 6.5.2->6.5.3] macOS: topLevelAt/widgetAt cannot find something under a window with setIgnoresMouseEvents set
- Closed
For Gerrit Dashboard: QTBUG-41696 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
518004,4 | macOS: Take window mask into account when computing QCocoaScreen::topLevelAt | dev | qt/qtbase | Status: MERGED | +2 | 0 |
518723,2 | macOS: Take window mask into account when computing QCocoaScreen::topLevelAt | 6.6 | qt/qtbase | Status: MERGED | +2 | 0 |
519122,2 | macOS: Take window mask into account when computing QCocoaScreen::topLevelAt | tqtc/lts-6.5 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |