返回介绍

QGLayoutIterator Class

发布于 2019-10-04 15:00:31 字数 2052 浏览 984 评论 0 收藏 0

The QGLayoutIterator class is an abstract base class of internal layout iterators. More...

#include <qlayout.h>

List of all member functions.

Public Members

  • virtual ~QGLayoutIterator ()
  • virtual QLayoutItem * next () = 0
  • virtual QLayoutItem * current () = 0
  • virtual QLayoutItem * takeCurrent () = 0

Detailed Description

The QGLayoutIterator class is an abstract base class of internal layout iterators.

(This class is not OpenGL related, it just happens to start with the letters QGL...)

Subclass this class to create a custom layout. The functions that must be implemented are next(), current(), and takeCurrent().

The QGLayoutIterator implements the functionality of QLayoutIterator. Each subclass of QLayout needs a QGLayoutIterator subclass.

See also Widget Appearance and Style and Layout Management.


Member Function Documentation

QGLayoutIterator::~QGLayoutIterator () [virtual]

Destroys the iterator

QLayoutItem* QGLayoutIterator::current () [pure virtual]

Implemented in subclasses to return the current item, or 0 if there is no current item.

Examples: customlayout/border.cpp, customlayout/card.cpp and customlayout/flow.cpp.

QLayoutItem* QGLayoutIterator::next () [pure virtual]

Implemented in subclasses to move the iterator to the next item and return that item, or 0 if there is no next item.

Examples: customlayout/border.cpp, customlayout/card.cpp and customlayout/flow.cpp.

QLayoutItem* QGLayoutIterator::takeCurrent () [pure virtual]

Implemented in subclasses. The function must remove the current item from the layout without deleting it, move the iterator to the next item and return the removed item, or 0 if no item was removed.

Examples: customlayout/border.cpp, customlayout/card.cpp and customlayout/flow.cpp.

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

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

发布评论

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