mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-06-21 05:04:48 -04:00
parent
e85854aa24
commit
cb6b0dde27
1 changed files with 10 additions and 1 deletions
|
@ -70,7 +70,16 @@ void EditWidget::addPage(const QString& labelText, const QIcon& icon, QWidget* w
|
||||||
|
|
||||||
void EditWidget::setPageHidden(QWidget* widget, bool hidden)
|
void EditWidget::setPageHidden(QWidget* widget, bool hidden)
|
||||||
{
|
{
|
||||||
int index = m_ui->stackedWidget->indexOf(widget);
|
int index = -1;
|
||||||
|
|
||||||
|
for (int i = 0; i < m_ui->stackedWidget->count(); i++) {
|
||||||
|
auto* scrollArea = qobject_cast<QScrollArea*>(m_ui->stackedWidget->widget(i));
|
||||||
|
if (scrollArea != nullptr && scrollArea->widget() == widget) {
|
||||||
|
index = i;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (index != -1) {
|
if (index != -1) {
|
||||||
m_ui->categoryList->setCategoryHidden(index, hidden);
|
m_ui->categoryList->setCategoryHidden(index, hidden);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue