From 8169c8f4c902c40f5103c3d4fc8695b87b242a39 Mon Sep 17 00:00:00 2001 From: spiros Date: Thu, 29 May 2025 17:32:46 +0300 Subject: [PATCH] Add a placeholder on the search bar --- src/gridview.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gridview.cpp b/src/gridview.cpp index 2b00ad2..87b3c2b 100644 --- a/src/gridview.cpp +++ b/src/gridview.cpp @@ -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(); });