forked from qt-creator/qt-creator
Qnx: Add history completer to path choosers
Change-Id: I2828045d1ccd2621786b563f22cce6e5d14f37ee Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
@@ -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()));
|
||||
|
||||
Reference in New Issue
Block a user