mirror of
https://github.com/feather-wallet/feather.git
synced 2024-12-22 19:49:28 +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
|
#ifndef FEATHER_COMPONENTS_H
|
||||||
#define FEATHER_COMPONENTS_H
|
#define FEATHER_COMPONENTS_H
|
||||||
|
|
||||||
|
#include <QCompleter>
|
||||||
#include <QPushButton>
|
#include <QPushButton>
|
||||||
#include <QHBoxLayout>
|
#include <QHBoxLayout>
|
||||||
#include <QDialog>
|
#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
|
#endif //FEATHER_COMPONENTS_H
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
#include <QCompleter>
|
#include <QCompleter>
|
||||||
#include <QStringListModel>
|
#include <QStringListModel>
|
||||||
|
|
||||||
|
#include "components.h"
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
class PageWalletRestoreSeed;
|
class PageWalletRestoreSeed;
|
||||||
}
|
}
|
||||||
|
@ -41,7 +43,7 @@ private:
|
||||||
int length;
|
int length;
|
||||||
QStringList words;
|
QStringList words;
|
||||||
QStringListModel completerModel;
|
QStringListModel completerModel;
|
||||||
QCompleter completer;
|
SpaceCompleter completer;
|
||||||
Seed::Type type;
|
Seed::Type type;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue