Skip to content

Commit

Permalink
[SettingsViewer] Enable clear button.
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabien-B committed Apr 19, 2022
1 parent 6ff0908 commit 420a62f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/widgets/settings_viewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ SettingsViewer::SettingsViewer(QString ac_id, QWidget *parent) : QWidget(parent)

search_bar = new QLineEdit(this);
search_bar->setPlaceholderText("search");
search_bar->setClearButtonEnabled(true);
search_layout->addWidget(search_bar);

auto search_callback = [=](const QString str) {
Expand Down Expand Up @@ -111,6 +112,7 @@ void SettingsViewer::init(QString ac_id) {
scroll_content->setCurrentIndex(widgets_indexes[settings]);
path->setCurrentIndex(path_indexes[settings]);
scroll->verticalScrollBar()->setValue(0);
search_bar->clear();
}
);

Expand Down

0 comments on commit 420a62f

Please sign in to comment.