Qnx: Add history completer to path choosers

Change-Id: I2828045d1ccd2621786b563f22cce6e5d14f37ee
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
Tobias Hunger
2013-11-25 14:37:03 +01:00
parent bdce2abf1b
commit 1fca343157
10 changed files with 19 additions and 0 deletions

View File

@@ -60,6 +60,7 @@ QWidget *PathChooserDelegate::createEditor(QWidget *parent, const QStyleOptionVi
Utils::PathChooser *editor = new Utils::PathChooser(parent);
editor->setHistoryCompleter(m_historyKey);
editor->setAutoFillBackground(true); // To hide the text beneath the editor widget
editor->lineEdit()->setMinimumWidth(0);
@@ -97,6 +98,11 @@ void PathChooserDelegate::updateEditorGeometry(QWidget *editor, const QStyleOpti
editor->setGeometry(option.rect);
}
void PathChooserDelegate::setHistoryCompleter(const QString &key)
{
m_historyKey = key;
}
void PathChooserDelegate::emitCommitData()
{
emit commitData(qobject_cast<QWidget*>(sender()));