Improve property offering in Utils::PathChooser

Add notifier to path property.
Add promptDialogFilter to property list.

Change-Id: Ic0e5dbdc1a2c1ac64477baeee5f55bc4416bc526
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
This commit is contained in:
Andrew Knight
2013-07-13 14:44:26 +03:00
parent c32db57514
commit e349fb48b4
2 changed files with 10 additions and 1 deletions

View File

@@ -246,6 +246,7 @@ PathChooser::PathChooser(QWidget *parent) :
connect(d->m_lineEdit, SIGNAL(validChanged()), this, SIGNAL(validChanged()));
connect(d->m_lineEdit, SIGNAL(validChanged(bool)), this, SIGNAL(validChanged(bool)));
connect(d->m_lineEdit, SIGNAL(editingFinished()), this, SIGNAL(editingFinished()));
connect(d->m_lineEdit, SIGNAL(textChanged(QString)), this, SLOT(slotTextChanged()));
d->m_lineEdit->setMinimumWidth(120);
d->m_hLayout->addWidget(d->m_lineEdit);
@@ -421,6 +422,11 @@ void PathChooser::slotBrowse()
d->m_lineEdit->triggerChanged();
}
void PathChooser::slotTextChanged()
{
emit pathChanged(path());
}
bool PathChooser::isValid() const
{
return d->m_lineEdit->isValid();