mirror of
https://github.com/edisionnano/QDiskInfo.git
synced 2026-04-20 13:13:19 +03:00
Add a placeholder on the search bar
This commit is contained in:
@@ -21,7 +21,9 @@ GridView::GridView(QWidget *parent) : QWidget(parent) {
|
|||||||
|
|
||||||
QComboBox *searchField = new QComboBox();
|
QComboBox *searchField = new QComboBox();
|
||||||
searchField->setEditable(true);
|
searchField->setEditable(true);
|
||||||
connect(searchField->lineEdit(), &QLineEdit::textChanged, this, [this](const QString &text) {
|
QLineEdit *lineEdit = searchField->lineEdit();
|
||||||
|
lineEdit->setPlaceholderText(tr("Search for a disk..."));
|
||||||
|
connect(lineEdit, &QLineEdit::textChanged, this, [this](const QString &text) {
|
||||||
this->searchQuery = text;
|
this->searchQuery = text;
|
||||||
populateGrid();
|
populateGrid();
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user