You need to import a static plugin for JPEG into your program. See Q_IMPORT_PLUGIN in the docs.