Add dependency on QtQuickControls2 to correctly style timeline controls

parent 0fb7ba92
Pipeline #14257 canceled with stage
......@@ -57,7 +57,7 @@ find_package(KF5 REQUIRED COMPONENTS Archive Bookmarks CoreAddons Config ConfigW
# Qt
set(QT_MIN_VERSION 5.11.0)
find_package(Qt5 REQUIRED COMPONENTS Core DBus Widgets Svg Quick Concurrent QuickWidgets Multimedia)
find_package(Qt5 REQUIRED COMPONENTS Core DBus Widgets Svg Quick QuickControls2 Concurrent QuickWidgets Multimedia)
add_definitions(-DQT_NO_CAST_TO_ASCII -DQT_NO_URL_CAST_FROM_STRING)
set(DEFAULT_CXX_FLAGS "${DEFAULT_CXX_FLAGS} ${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}")
......
......@@ -131,6 +131,7 @@ target_link_libraries(kdenliveLib
KF5::Solid
Qt5::Svg
Qt5::Quick
Qt5::QuickControls2
Qt5::QuickWidgets
Qt5::Concurrent
Qt5::Multimedia
......
......@@ -36,7 +36,7 @@ the Free Software Foundation, either version 3 of the License, or
#include <QCoreApplication>
#include <QInputDialog>
#include <QDir>
#include <QQuickStyle>
#include <locale>
#ifdef Q_OS_MAC
#include <xlocale.h>
......@@ -127,6 +127,13 @@ void Core::initGUI(const QUrl &Url, const QString &clipsToLoad)
m_currentProfile = m_profile;
profileChanged();
m_mainWindow = new MainWindow();
QStringList styles = QQuickStyle::availableStyles();
if (styles.contains(QLatin1String("org.kde.desktop"))) {
QQuickStyle::setStyle("org.kde.desktop");
} else if (styles.contains(QLatin1String("Fusion"))) {
QQuickStyle::setStyle("Fusion");
}
connect(this, &Core::showConfigDialog, m_mainWindow, &MainWindow::slotPreferences);
// load default profile and ask user to select one if not found.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment