Details
-
Bug
-
Resolution: Incomplete
-
P2: Important
-
None
-
5.6.2
-
None
-
openSUSE Leap 42.1
Description
I use openSUSE Leap 42.1 as my main system. It has Qt 5.5.1 installed system-wide. Btw I use Qt 5.6.2 from Qt online installer for my apps.
Problem: all apps built with 5.6 use fusion style and qt file dialogs. So I can't get native look'n'feel on all Qt based DE's. But on GTK based all works fine.
I use startup script from Qt docs: https://doc.qt.io/qt-5/linux-deployment.html.
As a workaround I use this in main.cpp:
QStringList list = QCoreApplication::libraryPaths();
list.append("/usr/lib64/qt5/plugins");
list.append("/usr/lib/x86_64-linux-gnu/qt5/plugins/");
QCoreApplication::setLibraryPaths(list);
This hack works well on my machine, but on Kubuntu 16.10 with system-wide Qt 5.6.1 my program crashes (backtrace in attachment).
Question: is there a convenient way to load system-wide style plugins? Can it be as simple as load native GTK style?