返回介绍

QListBoxPixmap Class

发布于 2019-10-04 15:01:08 字数 3655 浏览 1006 评论 0 收藏 0

The QListBoxPixmap class provides list box items with a pixmap and optional text. More...

#include <qlistbox.h>

Inherits QListBoxItem.

List of all member functions.

Public Members

  • QListBoxPixmap ( QListBox*listbox, constQPixmap&pixmap )
  • QListBoxPixmap ( constQPixmap&pixmap )
  • QListBoxPixmap ( QListBox*listbox, constQPixmap&pixmap, QListBoxItem*after )
  • QListBoxPixmap ( QListBox*listbox, constQPixmap&pix, constQString&text )
  • QListBoxPixmap ( constQPixmap&pix, constQString&text )
  • QListBoxPixmap ( QListBox*listbox, constQPixmap&pix, constQString&text, QListBoxItem*after )
  • ~QListBoxPixmap ()
  • virtual const QPixmap * pixmap () const
  • virtual int height ( constQListBox*lb ) const
  • virtual int width ( constQListBox*lb ) const

Protected Members

  • virtual void paint ( QPainter*painter )

Detailed Description

The QListBoxPixmap class provides list box items with a pixmap and optional text.

Items of this class are drawn with the pixmap on the left with the optional text to the right of the pixmap.

See also QListBox, QListBoxItem and Advanced Widgets.


Member Function Documentation

QListBoxPixmap::QListBoxPixmap ( QListBox*listbox, constQPixmap&pixmap )

Constructs a new list box item in list box listbox showing the pixmap pixmap.

QListBoxPixmap::QListBoxPixmap ( constQPixmap&pixmap )

Constructs a new list box item showing the pixmap pixmap.

QListBoxPixmap::QListBoxPixmap ( QListBox*listbox, constQPixmap&pixmap, QListBoxItem*after )

Constructs a new list box item in list box listbox showing the pixmap pixmap. The item gets inserted after the item after.

QListBoxPixmap::QListBoxPixmap ( QListBox*listbox, constQPixmap&pix, constQString&text )

Constructs a new list box item in list box listbox showing the pixmap pix and the text text.

QListBoxPixmap::QListBoxPixmap ( constQPixmap&pix, constQString&text )

Constructs a new list box item showing the pixmap pix and the text to text.

QListBoxPixmap::QListBoxPixmap ( QListBox*listbox, constQPixmap&pix, constQString&text, QListBoxItem*after )

Constructs a new list box item in list box listbox showing the pixmap pix and the string text. The item gets inserted after the item after.

QListBoxPixmap::~QListBoxPixmap ()

Destroys the item.

int QListBoxPixmap::height ( constQListBox*lb ) const [virtual]

Returns the height of the pixmap in list box lb.

See also paint() and width().

Reimplemented from QListBoxItem.

void QListBoxPixmap::paint ( QPainter*painter ) [virtual protected]

Draws the pixmap using painter.

Reimplemented from QListBoxItem.

constQPixmap* QListBoxPixmap::pixmap () const [virtual]

Returns the pixmap associated with the item.

Reimplemented from QListBoxItem.

int QListBoxPixmap::width ( constQListBox*lb ) const [virtual]

Returns the width of the pixmap plus some margin in list box lb.

See also paint() and height().

Reimplemented from QListBoxItem.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文