Show browser integration tab dynamically

This commit is contained in:
varjolintu authored and Jonathan White committed 2021-01-12 07:33:05 -05:00
1 parent 7078086b50
commit bbc71b3144
3 files changed
+50 -29

No files matched your search

+12
View File
@@ -74,6 +74,18 @@ void EditWidget::addPage(const QString& labelText, const QIcon& icon, QWidget* w
m_ui->categoryList->addCategory(labelText, icon);
}
bool EditWidget::hasPage(QWidget* widget)
{
for (int i = 0; i < m_ui->stackedWidget->count(); i++) {
auto* scrollArea = qobject_cast<QScrollArea*>(m_ui->stackedWidget->widget(i));
if (scrollArea && scrollArea->widget() == widget) {
return true;
}
}
return false;
}
void EditWidget::setPageHidden(QWidget* widget, bool hidden)
{
int index = -1;