Qt学习之QLabel

来源:互联网 发布:win7 添加 网络打印机 编辑:程序博客网 时间:2024/04/24 22:36

QLabel 在帮助文档中是这么介绍的:在线文档Qt4.8 QLabel


一、程序中要使用QLabel需要保含下面头文件 

 #include <QLabel>

二、详细介绍如下

Detailed Description

The QLabel widget provides a text or image display.

QLabel is used for displaying text or an image. No user interaction functionality is provided. The visual appearance of the label can be configured in various ways, and it can be used for specifying a focus mnemonic key for another widget.

A QLabel can contain any of the following content types:

ContentSettingPlain textPass a QString to setText().Rich textPass a QString that contains rich text to setText().A pixmapPass a QPixmap to setPixmap().A moviePass a QMovie to setMovie().A numberPass an int or a double to setNum(), which converts the number to plain text.NothingThe same as an empty plain text. This is the default. Set by clear().

 QLabel 经常是用来显示文本text 或图片的窗体。



0 0
原创粉丝点击