Inserting an image in GUI using QT Designer

不想你离开。 提交于 2019-11-30 11:35:27

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!

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.

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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!