title: How to fix missing JPEG support in Qt 4.8 under Linux KDE4
body: <p><strong>[UPDATE]</strong> Upgrading to python 2.7.6 and Qt 4.8.7 appears to make this problem go away and JPEG support is provided. Whereas before creating a QPixmap object using a path to a .jpeg/.jpg file would produce an object for which isNull() was always True, now I get a valid QPixmap object.</p>
  
  <hr>
  
  <p>The platform in question is a CentOS 7.2 system with KDE4 as the default desktop environment. Qt 4.8.5 is installed along with PySide 1.2.2. JPEG support seems to be missing for some reason.</p>
  
  <pre><code>&gt;&gt;&gt; from PySide import QtGui
  &gt;&gt;&gt; pprint(QtGui.QImageReader.supportedImageForamts())
  [PySide.QtCore.QByteArray('BW'),
   PySide.QtCore.QByteArray('EPS'),
   PySide.QtCore.QByteArray('EPSF'),
   PySide.QtCore.QByteArray('EPSI'),
   PySide.QtCore.QByteArray('EXR'),
   PySide.QtCore.QByteArray('PCX'),
   PySide.QtCore.QByteArray('PSD'),
   PySide.QtCore.QByteArray('RAS'),
   PySide.QtCore.QByteArray('RGB'),
   PySide.QtCore.QByteArray('RGBA'),
   PySide.QtCore.QByteArray('SGI'),
   PySide.QtCore.QByteArray('TGA'),
   PySide.QtCore.QByteArray('XCF'),
   PySide.QtCore.QByteArray('bmp'),
   PySide.QtCore.QByteArray('bw'),
   PySide.QtCore.QByteArray('dds'),
   PySide.QtCore.QByteArray('eps'),
   PySide.QtCore.QByteArray('epsf'),
   PySide.QtCore.QByteArray('epsi'),
   PySide.QtCore.QByteArray('exr'),
   PySide.QtCore.QByteArray('jp2'),
   PySide.QtCore.QByteArray('pbm'),
   PySide.QtCore.QByteArray('pcx'),
   PySide.QtCore.QByteArray('pgm'),
   PySide.QtCore.QByteArray('pic'),
   PySide.QtCore.QByteArray('png'),
   PySide.QtCore.QByteArray('ppm'),
   PySide.QtCore.QByteArray('psd'),
   PySide.QtCore.QByteArray('ras'),
   PySide.QtCore.QByteArray('rgb'),
   PySide.QtCore.QByteArray('rgba'),
   PySide.QtCore.QByteArray('sgi'),
   PySide.QtCore.QByteArray('tga'),
   PySide.QtCore.QByteArray('xbm'),
   PySide.QtCore.QByteArray('xcf'),
   PySide.QtCore.QByteArray('xpm'),
   PySide.QtCore.QByteArray('xv')]
  </code></pre>
  
  <p>As you can see there is no JPEG support listed. The Qt imageformats contains:</p>
  
  <pre><code>libqgif.so
  libqico.so
  libqjpeg.so
  libqmng.so
  libqsvg.so
  libqtga.so
  libqtiff.so
  </code></pre>
  
  <p>Doing an ldd on libqjpeg.so yields:</p>
  
  <pre><code>linux-vdso.so.1 =&gt;  (0x00007ffc43530000)
  libQtGui.so.4 =&gt; /lib64/libQtGui.so.4 (0x00007f2c11977000)
  libQtCore.so.4 =&gt; /lib64/libQtCore.so.4 (0x00007f2c1148c000)
  libpthread.so.0 =&gt; /lib64/libpthread.so.0 (0x00007f2c1126f000)
  libstdc++.so.6 =&gt; /lib64/libstdc++.so.6 (0x00007f2c10f67000)
  libm.so.6 =&gt; /lib64/libm.so.6 (0x00007f2c10c65000)
  libgcc_s.so.1 =&gt; /lib64/libgcc_s.so.1 (0x00007f2c10a4e000)
  libc.so.6 =&gt; /lib64/libc.so.6 (0x00007f2c1068d000)
  libgthread-2.0.so.0 =&gt; /lib64/libgthread-2.0.so.0 (0x00007f2c1048b000)
  libglib-2.0.so.0 =&gt; /lib64/libglib-2.0.so.0 (0x00007f2c10153000)
  libpng15.so.15 =&gt; /lib64/libpng15.so.15 (0x00007f2c0ff28000)
  libz.so.1 =&gt; /lib64/libz.so.1 (0x00007f2c0fd12000)
  libfreetype.so.6 =&gt; /lib64/libfreetype.so.6 (0x00007f2c0fa6b000)
  libgobject-2.0.so.0 =&gt; /lib64/libgobject-2.0.so.0 (0x00007f2c0f81b000)
  libSM.so.6 =&gt; /lib64/libSM.so.6 (0x00007f2c0f613000)
  libICE.so.6 =&gt; /lib64/libICE.so.6 (0x00007f2c0f3f6000)
  libXi.so.6 =&gt; /lib64/libXi.so.6 (0x00007f2c0f1e6000)
  libXrender.so.1 =&gt; /lib64/libXrender.so.1 (0x00007f2c0efdc000)
  libXrandr.so.2 =&gt; /lib64/libXrandr.so.2 (0x00007f2c0edd1000)
  libXfixes.so.3 =&gt; /lib64/libXfixes.so.3 (0x00007f2c0ebcb000)
  libXcursor.so.1 =&gt; /lib64/libXcursor.so.1 (0x00007f2c0e9c0000)
  libXinerama.so.1 =&gt; /lib64/libXinerama.so.1 (0x00007f2c0e7bc000)
  libfontconfig.so.1 =&gt; /lib64/libfontconfig.so.1 (0x00007f2c0e580000)
  libXext.so.6 =&gt; /lib64/libXext.so.6 (0x00007f2c0e36e000)
  libX11.so.6 =&gt; /lib64/libX11.so.6 (0x00007f2c0e02f000)
  libdl.so.2 =&gt; /lib64/libdl.so.2 (0x00007f2c0de2b000)
  librt.so.1 =&gt; /lib64/librt.so.1 (0x00007f2c0dc23000)
  /lib64/ld-linux-x86-64.so.2 (0x00007f2c128b9000)
  libffi.so.6 =&gt; /lib64/libffi.so.6 (0x00007f2c0da1a000)
  libuuid.so.1 =&gt; /lib64/libuuid.so.1 (0x00007f2c0d815000)
  libexpat.so.1 =&gt; /lib64/libexpat.so.1 (0x00007f2c0d5ea000)
  libxcb.so.1 =&gt; /lib64/libxcb.so.1 (0x00007f2c0d3c8000)
  libXau.so.6 =&gt; /lib64/libXau.so.6 (0x00007f2c0d1c3000)
  </code></pre>
  
  <p>I see no missing shared libraries, but also nothing that looks like a JPEG library. QT_PLUGIN_PATH points to /usr/lib64/kde4/plugins, and /usr/lib64/kde4/plugins/imageformats contains these files:</p>
  
  <pre><code>kimg_dds.so
  kimg_eps.so
  kimg_exr.so
  kimg_jp2.so
  kimg_pcs.so
  kimg_pic.so
  kimg_psd.so
  kimg_ras.so
  kimg_rgb.so
  kimg_tga.so
  kimg_xcf.so
  kimg_xview.so
  </code></pre>
  
  <p>So no kimg_jpeg.so (if there even is such a thing), and clearly kimg_jp2.so isn't providing JPEG support. So what am I missing?</p>