qt5kde-plasma

Qt5 does not use KDE application style


I created a simple Qt application following the Get started with CMake tutorial. I noticed that it does not use the selected application style, instead it uses Fusion. I use the KDE spin of Fedora, and Kvantum to theme apps.

I listed the available styles using QStyleFactory::keys() and it only returned the Windows and Fusion styles.

How to set up Qt so it uses the selected application style?


Solution

  • Okay, so I made the mistake of installing Qt with the installer from their home page.

    It should work whith the development packages provided by your distros package manager (on Fedora it was qt5-qtbase-devel).