Inserting an image in GUI using QT Designer

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".

Insert Figure

Now, you have to create a resource file. Click on the Pencil button. Next, click on the "New resource file" button.

enter image description here

Choose a name and a folder (your working directory would be a good choice) to save it.

Now, click on the "Add prefix" button.

enter image description here

Choose a name for it.

Then, click on the "Add file" button.

enter image description here

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!


The easiest way I've seen so on :

You drag and drop your Label on your window, select the Label, you'll see on the right side of your screen the 'Property Editor' frame and the 'QLabel' menu, you click on pixmap => Choose File..., select a file and that's it.

enter image description here

Make sure you have resized it before, you won't be able to do so in QtDesigner.

Just for you to know I'm just a beginner on PyQT5 / QtDesigner, so that may not be the proper way to do it.

Hope it helps

Tags:

Qt

Qt Designer