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:
From the widget I go to the resources browser and click on the "add new file" button then a new window pops up.
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
(Using the Qt Designer that is inside of Qt creator)
I took those instructions from the video QT Resource Files
You only need Qt Designer, and it can be done very easily, like this:
I would use Qt Creator, since Qt Designer is built in and you can simply create resource files. However, if that's not possible for you, here's a simple qrc data file contents that you can use: -
<RCC>
<qresource prefix="/images">
</qresource>
</RCC>
It creates a prefix called "/images/", ready to add images to the resource. Just create a file with .qrc extension and add that.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With