Creating a resource file to use it in Qt Designer

nprak picture nprak · Oct 22, 2014 · Viewed 36.7k times · Source

I want to add a background image to a widget and thus I need a resource file but I am not able to create it in Qt Designer. Here is what I did:

  1. From the widget I go to the resources browser and click on the "add new file" button then a new window pops up.

  2. I am asked to point to the .qrc file but this file does not exist and I don't know how to create it.

I googled and found that .qrc files are created using Qt Creator.

Can't I create a .qrc file in Qt Designer ? Do I need to use Qt Creator to create a .qrc file and then use it in QT Designer ?

I am using Qt Designer with PyQt in CentOS 7.0

Answer

Diego Juliao picture Diego Juliao · Jan 10, 2017

Using Qt Creator.

(Using the Qt Designer that is inside of Qt creator)

  1. Right clicking on your project
  2. Add new
  3. Step on the left option QT
  4. Qt Resource file
  5. Follow the wizard to add one

I took those instructions from the video QT Resource Files