QFocusData(3qt)

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

πŸ’– QFocusData πŸ’–

okay so bestie, welcome to the QFocusData(3qt) manual page πŸŽ€ this one's all about the class that keeps track of who's next in the focus chain. slay. let's get into it ✨

🌸 NAME 🌸

QFocusData β€” maintains the list of widgets in the focus chain πŸ¦‹


✨ SYNOPSIS ✨

#include <qfocusdata.h>

πŸ‘‘ Public Members

QWidget * focusWidget () const
QWidget * home ()
QWidget * next ()
QWidget * prev ()
QWidget * first () const
QWidget * last () const
int count () const

πŸ’… DESCRIPTION πŸ’…

The QFocusData class maintains the list of widgets in the focus chain. literally its whole job, and it does it beautifully πŸ’–

This read-only list always contains at least one widget (i.e. the top-level widget). no cap. it gives you a simple cursor that you can reset to the current focus widget using home(), or move to its neighboring widgets using next() and prev(). you can also retrieve the count() of the number of widgets in the list. and here's the iconic part β€” the list is a loop, so if you keep iterating, for example using next(), you will never come to the end. it's giving infinite hallway πŸŒ€

Some widgets in the list may not accept focus. Widgets are added to the list as necessary, but not removed from it. this lets widgets change focus policy dynamically without disrupting the focus chain the user experiences. when a widget disables and re-enables tab focus, its position in the focus chain does not change. periodt. πŸ’…

When reimplementing QWidget::focusNextPrevChild() to provide special focus flow, you will usually call QWidget::focusData() to retrieve the focus data stored at the top-level widget. a top-level widget's focus data contains the focus list for its hierarchy of widgets. main character energy tbh πŸ‘‘

⚠️ The cursor may change at any time. πŸ™ˆ
🚫 This class is not thread-safe. do not come for it with threads bestie, it will not survive πŸ’€

See also QWidget::focusNextPrevChild(), QWidget::setTabOrder(), QWidget::focusPolicy, and Miscellaneous Classes. 🫢


πŸŽ€ MEMBER FUNCTION DOCUMENTATION πŸŽ€

⭐ int QFocusData::count () const

Returns the number of widgets in the focus chain. just a lil headcount, no cursor drama 🌸

⭐ QWidget * QFocusData::first () const

Returns the first widget in the focus chain. The cursor is not modified. your cursor stays exactly where it was, bestie πŸ¦‹

⭐ QWidget * QFocusData::focusWidget () const

Returns the widgets in the hierarchy that are in the focus chain. πŸ’–

⭐ QWidget * QFocusData::home ()

Moves the cursor to the focusWidget() and returns that widget. You must call this before next() or prev() to iterate meaningfully. like, genuinely, do not skip this step or your iteration is gonna be nonsense 😭

⭐ QWidget * QFocusData::last () const

Returns the last widget in the focus chain. The cursor is not modified. πŸ‘‘

⭐ QWidget * QFocusData::next ()

Moves the cursor to the next widget in the focus chain. There is always a next widget because the list is a loop. always. forever. slay πŸ”₯

⭐ QWidget * QFocusData::prev ()

Moves the cursor to the previous widget in the focus chain. There is always a previous widget because the list is a loop. same deal, other direction πŸ’«


🌈 SEE ALSO 🌈


Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the license file included in the distribution for a complete license statement.


🌸 AUTHOR 🌸

Generated automatically from the source code. (the code wrote its own autobiography, iconic 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. 🫢

The definitive Qt documentation is provided in HTML format; it is 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 this format is not officially supported by Trolltech. ngl, respect the man page girlies πŸ’…

If you find errors in this manual page, please report them to qt-bugs@trolltech.com. Please include the name of the manual page (qfocusdata.3qt) and the Qt version (3.3.8).


and that's the whole page bestie!! brought to you by Trolltech AS on 2 February 2007, Qt version 3.3.8 ✨ bye babes, go iterate that focus chain πŸ’–πŸŽ€πŸ¦‹πŸ‘‘βœ¨

πŸ“¦ where this page comes from