FancyTabWidget: Use QApplication::style(), not style()

This commit is contained in:
Jonas Kvinge 2023-10-07 15:36:49 +02:00
parent ac17df2a86
commit b5c0e93989
1 changed files with 2 additions and 2 deletions

View File

@ -463,9 +463,9 @@ FancyTabWidget::FancyTabWidget(QWidget *parent)
setUsesScrollButtons(true);
if (QApplication::style() && QApplication::style()->objectName().contains(QRegularExpression("^adwaita.*$", QRegularExpression::CaseInsensitiveOption))) {
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
style_ = new FancyTabWidgetProxyStyle(style()->name());
style_ = new FancyTabWidgetProxyStyle(QApplication::style()->name());
#else
style_ = new FancyTabWidgetProxyStyle(style()->objectName());
style_ = new FancyTabWidgetProxyStyle(QApplication::style()->objectName());
#endif
setStyle(style_);
}