forked from qt-creator/qt-creator
Introduce Utils::TreeView/TreeWidget
The only view that is sane is my view. Adds handling of return/enter for macintosh. Allows for overriding whether single or double click activates items via setActivationMode. Change-Id: Id8f9001f99162833c682dfc5b2b1abac04ce18a3 Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
@@ -360,6 +360,13 @@ int ManhattanStyle::styleHint(StyleHint hint, const QStyleOption *option, const
|
||||
case QStyle::SH_ItemView_ArrowKeysNavigateIntoChildren:
|
||||
ret = true;
|
||||
break;
|
||||
case QStyle::SH_ItemView_ActivateItemOnSingleClick:
|
||||
// default depends on the style
|
||||
if (widget) {
|
||||
QVariant activationMode = widget->property("ActivationMode");
|
||||
if (activationMode.isValid())
|
||||
ret = activationMode.toBool();
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user