mirror of
https://github.com/wownero/wowlet.git
synced 2026-10-17 07:11:29 +02:00
wizard: add space when autocompleting words
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user