Editors: Add option to not hide the mouse cursor when typing

Task-number: QTCREATORBUG-3584

Change-Id: Iae5551d36b72c5712f3276b15dfa85982a776dcf
Reviewed-by: David Schulz <david.schulz@digia.com>
This commit is contained in:
Eike Ziller
2014-02-10 13:23:59 +01:00
parent def888d13a
commit f335da7a75
6 changed files with 35 additions and 4 deletions

View File

@@ -1508,7 +1508,7 @@ static inline bool isModifier(QKeyEvent *e)
void BaseTextEditorWidget::keyPressEvent(QKeyEvent *e)
{
if (!isModifier(e))
if (!isModifier(e) && mouseHidingEnabled())
viewport()->setCursor(Qt::BlankCursor);
ToolTip::hide();
@@ -2268,6 +2268,16 @@ bool BaseTextEditorWidget::mouseNavigationEnabled() const
return d->m_behaviorSettings.m_mouseNavigation;
}
void BaseTextEditorWidget::setMouseHidingEnabled(bool b)
{
d->m_behaviorSettings.m_mouseHiding = b;
}
bool BaseTextEditorWidget::mouseHidingEnabled() const
{
return d->m_behaviorSettings.m_mouseHiding;
}
void BaseTextEditorWidget::setScrollWheelZoomingEnabled(bool b)
{
d->m_behaviorSettings.m_scrollWheelZooming = b;