返回介绍

QListBoxText Class

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

The QListBoxText class provides list box items that display text. More...

#include <qlistbox.h>

Inherits QListBoxItem.

List of all member functions.

Public Members

  • QListBoxText ( QListBox*listbox, constQString&text = QString::null )
  • QListBoxText ( constQString&text = QString::null )
  • QListBoxText ( QListBox*listbox, constQString&text, QListBoxItem*after )
  • ~QListBoxText ()
  • virtual int height ( constQListBox*lb ) const
  • virtual int width ( constQListBox*lb ) const

Protected Members

  • virtual void paint ( QPainter*painter )

Detailed Description

The QListBoxText class provides list box items that display text.

The text is drawn in the widget's current font. If you need several different fonts, you must implement your own subclass of QListBoxItem.

See also QListBox, QListBoxItem and Advanced Widgets.


Member Function Documentation

QListBoxText::QListBoxText ( QListBox*listbox, constQString&text = QString::null )

Constructs a list box item in list box listbox showing the text text.

QListBoxText::QListBoxText ( constQString&text = QString::null )

Constructs a list box item showing the text text.

QListBoxText::QListBoxText ( QListBox*listbox, constQString&text, QListBoxItem*after )

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

QListBoxText::~QListBoxText ()

Destroys the item.

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

Returns the height of a line of text in list box lb.

See also paint() and width().

Reimplemented from QListBoxItem.

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

Draws the text using painter.

Reimplemented from QListBoxItem.

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

Returns the width of this line in list box lb.

See also paint() and height().

Reimplemented from QListBoxItem.

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

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

发布评论

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