[vlc-commits] qt: force QML fusion style

Pierre Lamot git at videolan.org
Thu Apr 11 17:42:07 CEST 2019


vlc | branch: master | Pierre Lamot <pierre at videolabs.io> | Thu Apr 11 16:35:09 2019 +0200| [e319785cfa94caa8c9bba7c3a0611ecd235ae234] | committer: Thomas Guillem

qt: force QML fusion style

Forcing a QQuickStyle avoids the use of system style components which may have
unexpected behaviors.

Fusion style is provided by Qt and has desktop look'n feel and use system
palette.

Signed-off-by: Thomas Guillem <thomas at gllm.fr>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e319785cfa94caa8c9bba7c3a0611ecd235ae234
---

 modules/gui/qt/qt.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/modules/gui/qt/qt.cpp b/modules/gui/qt/qt.cpp
index 5856919789..20fa3e5cf8 100644
--- a/modules/gui/qt/qt.cpp
+++ b/modules/gui/qt/qt.cpp
@@ -42,6 +42,7 @@ extern "C" char **environ;
 #include <QApplication>
 #include <QDate>
 #include <QMutex>
+#include <QtQuickControls2/QQuickStyle>
 
 #include "qt.hpp"
 
@@ -566,6 +567,8 @@ static void *Thread( void *obj )
     QApplication::setAttribute( Qt::AA_DontCheckOpenGLContextThreadAffinity );
     QQuickWindow::setDefaultAlphaBuffer(true);
 
+    QQuickStyle::setStyle("fusion");
+
     /* Start the QApplication here */
     QVLCApp app( argc, argv );
 



More information about the vlc-commits mailing list