Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.6.1
-
None
-
Mac OS X, Qt 5.6.1
Description
I wanted to draw a focus ring on my custom controls on a Macintosh. So I naively used QStyle::drawPrimitive(PE_FrameFocusRect, ...) to do it based on the documentation for QStyle. It didn't draw anything.
Tracing into the code to figure out why, I find this in QMacStyle::drawPrimitive() (qmacstyle_mac.cpp):
case PE_FrameFocusRect: // Use the our own focus widget stuff. break;
In the QStyle documentation, under the heading "Developing Style-Aware Custom Widgets" the example code is drawing a focus rectangle!