In the PySide folder there is a plugins folder with all the necessary plugins, but they need to be manually added to QCoreApplication (or its heirs) using the addLibraryPath method:
def load_pyside_plugins(): """ Функция загружает Qt плагины. """ import PySide import os qApp = PySide.QtGui.QApplication.instance() for plugins_dir in [os.path.join(p, "plugins") for p in PySide.__path__]: qApp.addLibraryPath(plugins_dir)
Checking:
app = QApplication(sys.argv) load_pyside_plugins() image_formats = [str(_) for _ in QImageReader.supportedImageFormats()] print(image_formats)
Console:
['bmp', 'gif', 'ico', 'jpeg', 'jpg', 'mng', 'pbm', 'pgm', 'png', 'ppm', 'tga', 'tif', 'tiff', 'xbm', 'xpm']