This is the same fix as for QTBUG-30715, which leads me to think that
we should spend some more time and re-think how QComboBox gets focus.
See also qtbase
3b992f831.
Task-number: QTBUG-31298
Change-Id: I4393af00c8896051e9ed8b5d8af510633106913c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
if (!factory)
return 0;
- return factory->createEditor(property, parent);
+ QWidget *w = factory->createEditor(property, parent);
+ // Since some editors can be QComboBoxes, and we changed their focus policy in Qt 5
+ // to make them feel more native on Mac, we need to relax the focus policy to something
+ // more permissive to keep the combo box from losing focus, allowing it to stay alive,
+ // when the user clicks on it to show the popup.
+ if (w)
+ w->setFocusPolicy(Qt::WheelFocus);
+ return w;
}
bool QtAbstractPropertyBrowser::addFactory(QtAbstractPropertyManager *abstractManager,