13
I am new to QtDesigner. I wanted to know how to insert an image in the GUI using QT Designer. I am trying to add a logo. Help would be appreciated.
- i would lookup Qt Resource System and a widget. – pce Feb 16 '15 at 7:28
- I added a QFrame in QtDesigner and in the properties tab --> style sheet, I just open for changing style sheet. It asked for my resource file. I gave my resource file. After that I clicked add files --> Browse for my image (the path of which is in my QGIS Plugin directory). It says "Invalid Style sheet" Where I am wrong? – User123 Feb 16 '15 at 10:33
- can you post the stylesheet? – pce Feb 16 '15 at 11:29
- @pce: Unfortunately, It is asking for reputations for posting images. – User123 Feb 16 '15 at 15:54
13
You can start inserting a label. Next, you right click on it an then click "change rich text...". A new window will pop-up. Click on the figure Icon "Insert figure".
Now, you have to create a resource file. Click on the Pencil button. Next, click on the "New resource file" button.
Choose a name and a folder (your working directory would be a good choice) to save it.
Now, click on the "Add prefix" button.
Choose a name for it.
Then, click on the "Add file" button.
And there you go! Click "OK" and you figure should be there. Just be aware that you should resize your figure to a proper size before using it.
Hope it helps!
pyrcc5 D:\MyFolder\resource_file.qrc -o D:\MyFolder\resource_file_rc.py
Hope this can help you.