I have an application developed in PyQt4.
He has installed icons for windows and QMenus.
All client systems have installed python. And PyQt4 boots from a network location (\\system_xyz\PyQt4).
The application works fine on developer systems with properly loaded icons. But when the same script is run on clients, the application works, but the icons do not load.
In my application, I also used Qsql drivers. He also had the same problem. It works in the developer system, but not in the client system.
I was able to overcome this issue with the sql driver by adding the sql plugin path to the application as shown below
SQLDriverPath = (r'\\system_xyz\PyQt4\plugins\sqldrivers')
QtGui.QApplication.addLibraryPath(SQLDriverPath)
I realized that pyqt4 needs qico4.dllto read .ico files. so I added the path imageformatsto the application. but it didn’t work.
ImageDriverPath = (r'\\system_xyz\PyQt4\plugins\imageformats')
QtGui.QApplication.addLibraryPath(ImageDriverPath)
Can someone suggest me the right approach to solve my problem of loading .ico in PyQt application from the network.
MY UPDATES
I did the following to list the supported image formats.
import sys
sys.path.append(r'r'\\system_xyz')
from PyQt4 import QtGui
for imageType in QtGui.QImageReader.supportedImageFormats():
print imageType
OUTPUT
bmp
pbm
pgm
png
ppm
xbm
xpm
I tried to list as above, after adding imageformats, OP is the same even tried to create QtGui,QApplication(). The same result does not change.