I want to load Icon from qrc . I have compiled my .qrc file by following command:-
pyrcc5 icon.qrc >> icon.py
But I have no idea how to load this image. In C++ , I would just call "qrc:/Icon.png" . I had imported the icon.py file as this tiny riverbank page without any example has told but in Python I have no idea
So far this is my main.py code :-
% cat main.py
#!/usr/bin/python
import sys
from PyQt5.QtWidgets import QApplication
from PyQt5.QtGui import QIcon
from calculator import Calculator
import icon
app = QApplication(sys.argv)
win = Calculator()
win.setWindowIcon(QIcon("qrc/Icon.png"))
win.show()
sys.exit(app.exec_())
I am using PyQt5 with Python3.6