PYQT4 - How do I compile and import a qrc file into my program?

前端 未结 5 1211
余生分开走
余生分开走 2021-02-01 23:05

I\'m having trouble importing a resource file. I\'m using pyqt4 with monkey studio and I am trying to import a png image. When I run the program I get an import error like

5条回答
  •  青春惊慌失措
    2021-02-01 23:54

    Open cmd (or terminal on *nix) and run

    pyrcc4 -py3 F:\computing\Payrollv22\icon.qrc -o icon_rc.py
    

    It compiled the file successfully and I was able to import the py file into my project and run it with no problem.

提交回复
热议问题