QGLayoutIterator(3qt)

πŸ“¦ version 3.3.8b, in fedora 43, fedora 44

πŸ’– QGLayoutIterator πŸ’–

okay bestie, welcome to QGLayoutIterator(3qt) β€” yes that's the manual name, it lives in section 3qt of your man pages, and it's giving deep Qt internals energy. let's get into it 🫢


✨ NAME ✨

QGLayoutIterator β€” the abstract base class of internal layout iterators. that's it, that's the whole vibe. πŸ‘‘


🌸 SYNOPSIS 🌸

#include <qlayout.h>

πŸŽ€ Public Members πŸŽ€

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

like, look at those = 0s. pure virtual. she's an abstract queen and she said "implement me yourself, babe." πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so QGLayoutIterator is an abstract base class of internal layout iterators. that's the whole job description fr fr.

no cap: this class is not OpenGL related. it just happens to start with the letters QGL... and honestly that's such a trap. don't come here looking for your graphics pipeline bestie, she's not here. 😭

you subclass this class when you want to create a custom layout. the functions you must implement are next(), current(), and takeCurrent(). all three. no skipping. that's the assignment. πŸ“

the QGLayoutIterator implements the functionality of QLayoutIterator. and listen β€” every single subclass of QLayout needs a QGLayoutIterator subclass. no exceptions, no shortcuts, it's a package deal. πŸ’ž

see also Widget Appearance and Style and Layout Management β€” go read those too, i'm not gatekeeping.


πŸ‘‘ MEMBER FUNCTION DOCUMENTATION πŸ‘‘

QGLayoutIterator::~QGLayoutIterator () [virtual]

destroys the iterator. bye girl, thanks for the memories 🫑✨

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

implemented in subclasses to return the current item, or 0 if there is no current item. like, if there's nothing there, you return 0, don't invent a fake item, that's not the move bestie. 🚫

Examples:

(no examples shown here in the original β€” the section's empty, and i'm not about to make something up. integrity. πŸ’―)

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. so she scrolls forward one and hands you what she found, or 0 if she hit the end of the feed. πŸ“±

Examples:

(again, no examples in the original. we stay honest. πŸ™ˆ)

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

implemented in subclasses. and this one has a very specific job description, so pay attention:

the function must:

  1. remove the current item from the layout without deleting it β€” read that again, without deleting it, do not free her, she's just moving out, not dying πŸ’€
  2. move the iterator to the next item
  3. return the removed item β€” or 0 if no item was removed

three steps. in that order. that's the whole choreography. πŸ’ƒ

Examples:

(still empty in the original. i know, i know. 😭)


🌈 SEE ALSO 🌈


Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the license file included in the distribution for a complete license statement. (yes, the whole license statement lives in that file, go read it, i'm not paraphrasing legal text, that's not the vibe.) πŸ“œ


⭐ AUTHOR ⭐

Generated automatically from the source code. (so technically no human wrote this one. iconic behaviour honestly. πŸ€–βœ¨)


πŸ“ BUGS πŸ“

if you find a bug in Qt, please report it as described in http://doc.trolltech.com/bughowto.html. good bug reports help us to help you. thank you. 🫢 (genuinely though β€” a good bug report is a love letter to maintainers. be specific, be kind, slay.)

heads up: the definitive Qt documentation is provided in HTML format. it's located at $QTDIR/doc/html and can be read using Qt Assistant or with a web browser. this man page is provided as a convenience for those users who prefer man pages β€” although, lowkey, this format is not officially supported by Trolltech. so like... she's a fan-made remix of the real thing. still cute though. πŸ’…

if you find errors in this manual page, please report them to qt-bugs@trolltech.com. and when you do, please include:

  • the name of the manual page: qglayoutiterator.3qt
  • the Qt version: 3.3.8

that's it. include both, or the maintainers will be like "which one bestie??" 😭


and that's the whole page!! this one came from Trolltech AS, dated 2 February 2007, and it's documenting Qt version 3.3.8 (the 3qt in the title, iykyk). go forth and subclass responsibly, bestie. mwah πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from