Commit ba82f9a5 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by hjk

VariableChooser: Update variable description on keyboard navigation

Change-Id: I716e4bd6325f0d00b1fa73ea4a76f185660c89a0
Reviewed-by: default avatarhjk <hjk@theqtcompany.com>
parent b0e1dbb9
......@@ -77,6 +77,8 @@ public:
void contextMenuEvent(QContextMenuEvent *ev);
void currentChanged(const QModelIndex &current, const QModelIndex &previous);
private:
VariableChooserPrivate *m_target;
};
......@@ -225,6 +227,12 @@ void VariableTreeView::contextMenuEvent(QContextMenuEvent *ev)
m_target->insertText(expandedText);
}
void VariableTreeView::currentChanged(const QModelIndex &current, const QModelIndex &previous)
{
Q_UNUSED(previous);
m_target->updateDescription(current);
}
VariableChooserPrivate::VariableChooserPrivate(VariableChooser *parent)
: q(parent),
m_lineEdit(0),
......@@ -248,8 +256,6 @@ VariableChooserPrivate::VariableChooserPrivate(VariableChooser *parent)
verticalLayout->addWidget(m_variableTree);
verticalLayout->addWidget(m_variableDescription);
connect(m_variableTree, &QTreeView::clicked,
this, &VariableChooserPrivate::updateDescription);
connect(m_variableTree, &QTreeView::activated,
this, &VariableChooserPrivate::handleItemActivated);
connect(qobject_cast<QApplication *>(qApp), &QApplication::focusChanged,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment