forked from qt-creator/qt-creator
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user