Replacement for QWS_DBLCLICK_DISTANCE
Add QT_DBL_CLICK_DIST to replace QWS_DBLCLICK_DISTANCE for controlling the distance for detecting double clicks, which can be very useful on embedded devices [ChangeLog][QtGui] environment variable QT_DBL_CLICK_DIST customizes the amount of movement allowed when detecting a double click. Task-number: QTBUG-40841 Change-Id: I0a7534ad6cd6387d127eb49021a92d414d45670e Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
This commit is contained in:
parent
f45efafacf
commit
4a2e297b4f
@ -508,7 +508,11 @@ QVariant QPlatformTheme::defaultThemeHint(ThemeHint hint)
|
||||
case MousePressAndHoldInterval:
|
||||
return QVariant(800);
|
||||
case MouseDoubleClickDistance:
|
||||
return QVariant(5);
|
||||
{
|
||||
bool ok = false;
|
||||
int dist = qgetenv("QT_DBL_CLICK_DIST").toInt(&ok);
|
||||
return QVariant(ok ? dist : 5);
|
||||
}
|
||||
}
|
||||
return QVariant();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user