Monday, September 3, 2012

Qt: How to install Oxygen theme without KDE

In this quick post I'll show you an easy way how to install Oxygen them without need to install a lot of unnecessary KDE libraries.

If you are using GTK-based desktop environment (eg. XFCE, Gnome, Unity, ...) and are using some Qt applications, you may want to see how this Qt application looks in "native" widget style. Or you are just developing Qt applications and need to test its appereance in KDE's default style = Oxygen.

I am using Debian, so this how to will be focused on it, but you may use it with little changes for other distrubition too.

Download kde-style-oxygen package

First, you need to just download package with oxygen style. For Debian, please use this link.

Check its dependencies

If you try to install this package, apt-get will ask you to install a lot of KDE packages that you don't actually need. So instead of installing it, just unpack it.
Now you can check which libraries are missing on your system, just run ldd on every library from the package.

Install dependencies

For me, it was libkdecore5, libkdeui5 and libkio5. I just installed the first two with apt-get without any big issues, however, the libkio5 tried to install a lot of packages.

So I just repeated the same steps as for oxygen package: downloaded it from debian.packages.org and checked the dependencies.
It turned out that I need to install libnepomuk4, libstreamanalyzer0 and libsolid4. And that was it, I had now all I need to run oxygen theme.

Create new package

I created new package that contains oxygen and libkio and also creates symlink in /usr/lib/qt4/ so you can use oxygen in all Qt apps.

If you are interested, you can download it here (amd64).

3 comments:

  1. Replies
    1. i think i'll try making a pkg manually, following the above instructions.
      i am getting crashes in qt applictions now, when attempting to use 'open file' dialog. this is w/ the provided pkg installed.

      Delete
    2. Yup, I had the same issue. I believe this is because some libraries were missing.
      This howto is however little outdated, I only used it to test how the app looks in Oxygen (so I didn't have to use file dialog). Now I switched to KDE.

      Delete