I have this estructure on my application:
|-App
|
|-functions
|
|-ui
|--ui.py
|
|images
|
|main.py
i have a functions folder with some scripts and a ui folder with the PyQt generated code on the ui.py file.
and a main.py file that loads the ui.py to show the interface and ui.py loads some images from the "images" folder on the root.
if I execute my script directly on python (double clic on main.py file), the images wont show..
But if I use the terminal with "python main.py" the images show correctly.
The references on ui.py are like:
icon.addPixmap(QtGui.QPixmap(_fromUtf8("images/flags/MXN.png"))
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…