mirror of
https://github.com/JakubMelka/PDF4QT.git
synced 2025-06-05 21:59:17 +02:00
Support building against Qt-6.7
This commit is contained in:
@ -174,10 +174,12 @@ void PDFWidgetUtils::style(QWidget* widget)
|
||||
}
|
||||
}
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 8, 0)
|
||||
void PDFWidgetUtils::setDarkTheme(bool isDarkTheme)
|
||||
{
|
||||
QApplication::styleHints()->setColorScheme(isDarkTheme ? Qt::ColorScheme::Dark : Qt::ColorScheme::Light);
|
||||
}
|
||||
#endif
|
||||
|
||||
bool PDFWidgetUtils::isDarkTheme()
|
||||
{
|
||||
|
@ -60,8 +60,10 @@ public:
|
||||
/// Apply style to the widget
|
||||
static void style(QWidget* widget);
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 8, 0)
|
||||
/// Overrides automatically detected dark theme / light theme settings
|
||||
static void setDarkTheme(bool isDarkTheme);
|
||||
#endif
|
||||
|
||||
/// Returns true if the dark theme is currently set for the application.
|
||||
static bool isDarkTheme();
|
||||
|
Reference in New Issue
Block a user