mirror of
https://github.com/feather-wallet/feather.git
synced 2024-12-22 03:29:24 +00:00
wizard: add space when autocompleting words
This commit is contained in:
parent
2707a26d3c
commit
5acbd9a20f
3 changed files with 14 additions and 2 deletions
|
@ -4,6 +4,7 @@
|
|||
#ifndef FEATHER_COMPONENTS_H
|
||||
#define FEATHER_COMPONENTS_H
|
||||
|
||||
#include <QCompleter>
|
||||
#include <QPushButton>
|
||||
#include <QHBoxLayout>
|
||||
#include <QDialog>
|
||||
|
@ -117,4 +118,13 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
class SpaceCompleter : public QCompleter {
|
||||
protected:
|
||||
QString pathFromIndex(const QModelIndex &index) const override
|
||||
{
|
||||
QString completion = QCompleter::pathFromIndex(index);
|
||||
return completion + ' ';
|
||||
}
|
||||
};
|
||||
|
||||
#endif //FEATHER_COMPONENTS_H
|
||||
|
|
|
@ -237,4 +237,4 @@ void PageWalletRestoreSeed::onOptionsClicked() {
|
|||
m_fields->showSetRestoreHeightPage = check_overrideCreationDate.isChecked();
|
||||
m_fields->showSetSeedPassphrasePage = check_setSeedPasshprase.isChecked();
|
||||
m_fields->showSetSubaddressLookaheadPage = check_subaddressLookahead.isChecked();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
#include <QCompleter>
|
||||
#include <QStringListModel>
|
||||
|
||||
#include "components.h"
|
||||
|
||||
namespace Ui {
|
||||
class PageWalletRestoreSeed;
|
||||
}
|
||||
|
@ -41,7 +43,7 @@ private:
|
|||
int length;
|
||||
QStringList words;
|
||||
QStringListModel completerModel;
|
||||
QCompleter completer;
|
||||
SpaceCompleter completer;
|
||||
Seed::Type type;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue