I have seen Qt documentary and a lot of questions less-similar to this one, But i still haven't figured out how can i do it.
I'm not entirely sure how can i import resource file to Python code, so pixmap appears without any issues.
I have all files in same directory, I created qrc. file and compiled it with: rcc -binary resources.qrc -o res.rcc
to make resource file.
I imported res_rcc but pixmap on label was still not shown:
import res_rcc
This is what i had in my qrc. file:
<RCC>
<qresource prefix="newPrefix">
<file>download.jpeg</file>
</qresource>
</RCC>
Question:
How can i import resource files in the PyQt code ? | If pixmaps are in same directory as .qrc resource files, Do i still need to specify full path?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…