mirror of
https://github.com/edisionnano/QDiskInfo.git
synced 2026-03-07 20:09:55 +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();
|
||||
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;
|
||||
populateGrid();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user