如何附加图像到使用Qt创建的gui创建者 [英] how to attach image to gui created by using Qt creator

查看:120
本文介绍了如何附加图像到使用Qt创建的gui创建者的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将图像放在Qt创建的GUI上?
屏幕的西南部分是空的,所以我想要一个图片放在那里,点击一个按钮,但我无法使用QPixmap和setPixmap。请帮助我这个!

How to put an image on the GUI created by Qt? The south west part of the screen is empty so I want a picture to be put there on a click of a button but I am unable to use QPixmap and setPixmap. Please help me with this !

推荐答案

在Qt Creator中使用QLabel
然后转到QLabel的属性
转到Pixmap
选择文件

Use QLabel in Qt Creator Then Go to Properties of QLabel Go to Pixmap Select the file

完成。

这篇关于如何附加图像到使用Qt创建的gui创建者的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆