QToolBox(3qt)

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

✨ QToolBox πŸ’– (from the 3qt manual, bestie!)

okay so. picture this: you're deep in Qt 3 land, you need a whole stack of tabs sitting on top of each other like a lil accordion of widgets, and you want it to be cute. that's QToolBox, fr fr. welcome to the group chat. πŸŽ€


🌸 NAME 🌸

QToolBox β€” a column of tabbed widget items. literally that. a vertical vibe. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <qtoolbox.h>

Inherits QFrame. yes bestie, it's a frame, it's got that frame energy. πŸ‘‘

✨ Public Members ✨

QToolBox ( QWidget * parent = 0, const char * name = 0, WFlags f = 0 )
int addItem ( QWidget * w, const QString & label )
int addItem ( QWidget * item, const QIconSet & iconSet, const QString &
    label )
int insertItem ( int index, QWidget * item, const QString & label )
int insertItem ( int index, QWidget * item, const QIconSet & iconSet,
    const QString & label )
int removeItem ( QWidget * item )
void setItemEnabled ( int index, bool enabled )
bool isItemEnabled ( int index ) const
void setItemLabel ( int index, const QString & label )
QString itemLabel ( int index ) const
void setItemIconSet ( int index, const QIconSet & iconSet )
QIconSet itemIconSet ( int index ) const
void setItemToolTip ( int index, const QString & toolTip )
QString itemToolTip ( int index ) const
QWidget * currentItem () const
void setCurrentItem ( QWidget * item )
int currentIndex () const
QWidget * item ( int index ) const
int indexOf ( QWidget * item ) const
int count () const

πŸŽ€ Public Slots πŸŽ€

void setCurrentIndex ( int index )

πŸ”₯ Signals πŸ”₯

void currentChanged ( int index )

🌈 Properties 🌈

  • int count β€” the number of items contained in the toolbox (read only) πŸ‘€
  • int currentIndex β€” the index of the current item, or -1 if the toolbox is empty

πŸ’œ Protected Members πŸ’œ

virtual void itemInserted ( int index )
virtual void itemRemoved ( int index )

πŸ’– DESCRIPTION πŸ’–

The QToolBox class provides a column of tabbed widget items. periodt.

A toolbox is a widget that displays a column of tabs one above the other, with the current item displayed below the current tab. Every tab has an index position within the column of tabs. A tab's item is a QWidget. yes bestie, every single tab is holding a whole widget. main character energy fr. ✨

Each item has an itemLabel(), an optional icon, itemIconSet(), an optional itemToolTip(), and a widget. The item's attributes can be changed with setItemLabel(), setItemIconSet() and setItemToolTip(). glow-up on demand, we love to see it. πŸ’…

Items are added using addItem(), or inserted at particular positions using insertItem(). The total number of items is given by count(). Items can be deleted with delete, or removed from the toolbox with removeItem(). Combining removeItem() and insertItem() allows to move items to different positions. it's giving ✨ rearrange your whole life ✨.

The current item widget is returned by currentItem() and set with setCurrentItem(). If you prefer you can work in terms of indexes using currentIndex(), setCurrentIndex(), indexOf() and item(). two whole ways to do the same thing, iconic.

The currentChanged() signal is emitted when the current item is changed. πŸ‘‘

See also QTabWidget and Advanced Widgets.


🧚 MEMBER FUNCTION DOCUMENTATION 🧚

QToolBox::QToolBox ( QWidget * parent = 0, const char * name = 0, WFlags f = 0 )

Constructs a toolbox called name with parent parent and flags f. brand new toolbox, fresh out the box, no cap. 🎁

int QToolBox::addItem ( QWidget * item, const QIconSet & iconSet, const QString & label )

Adds the widget item in a new tab at bottom of the toolbox. The new tab's label is set to label, and the iconSet is displayed to the left of the label. Returns the new tab's index. new tab just dropped, bottom of the stack, she's here. πŸ”₯

int QToolBox::addItem ( QWidget * w, const QString & label )

This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

Adds the widget w in a new tab at bottom of the toolbox. The new tab's label is set to label. Returns the new tab's index. same energy, less icon. 🫢

int QToolBox::count () const

Returns the number of items contained in the toolbox. See the count property for details. she's counting, bestie. πŸ”’

void QToolBox::currentChanged ( int index ) [signal]

This signal is emitted when the current item changed. The new current item's index is passed in index, or -1 if there is no current item. not me getting notified every time the vibe shifts πŸ’€

int QToolBox::currentIndex () const

Returns the index of the current item, or -1 if the toolbox is empty. See the currentIndex property for details.

QWidget * QToolBox::currentItem () const

Returns the toolbox's current item, or 0 if the toolbox is empty. the one currently on stage, holding the mic 🎀

int QToolBox::indexOf ( QWidget * item ) const

Returns the index of item item, or -1 if the item does not exist. where in the lineup is she?? πŸ”

int QToolBox::insertItem ( int index, QWidget * item, const QIconSet & iconSet, const QString & label )

Inserts the widget item at position index, or at the bottom of the toolbox if index is out of range. The new item's label is set to label, and the iconSet is displayed to the left of the label. Returns the new item's index. cutting the line, respectfully. πŸ’…

int QToolBox::insertItem ( int index, QWidget * item, const QString & label )

This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

Inserts the widget item at position index, or at the bottom of the toolbox if index is out of range. The new item's label is set to label. Returns the new item's index. same, minus the icon. 🫢

bool QToolBox::isItemEnabled ( int index ) const

Returns TRUE if the item at position index is enabled; otherwise returns FALSE. vibe check: is she active or nah. 🌸

QWidget * QToolBox::item ( int index ) const

Returns the item at position index, or 0 if there is no such item.

QIconSet QToolBox::itemIconSet ( int index ) const

Returns the icon of the item at position index, or a null icon if index is out of range.

void QToolBox::itemInserted ( int index ) [virtual protected]

This virtual handler is called after a new item was added or inserted at position index. she's new here, announce her. πŸ“£

QString QToolBox::itemLabel ( int index ) const

Returns the label of the item at position index, or a null string if index is out of range.

void QToolBox::itemRemoved ( int index ) [virtual protected]

This virtual handler is called after an item was removed from position index. she left the group chat 😭

QString QToolBox::itemToolTip ( int index ) const

Returns the tooltip of the item at position index, or a null string if index is out of range.

int QToolBox::removeItem ( QWidget * item )

Removes the widget item from the toolbox. Note that the widget is not deleted. Returns the removed widget's index, or -1 if the widget was not in this tool box.

okay important bestie: removed β‰  deleted. she's off the toolbox but she still exists, do not assume she's gone forever, okay?? πŸ™ˆ

void QToolBox::setCurrentIndex ( int index ) [slot]

Sets the index of the current item, or -1 if the toolbox is empty to index. See the currentIndex property for details.

void QToolBox::setCurrentItem ( QWidget * item )

Sets the current item to be item. you're up, girl. ⭐

void QToolBox::setItemEnabled ( int index, bool enabled )

If enabled is TRUE then the item at position index is enabled; otherwise item index is disabled.

void QToolBox::setItemIconSet ( int index, const QIconSet & iconSet )

Sets the icon of the item at position index to iconSet. new icon, new era. ✨

void QToolBox::setItemLabel ( int index, const QString & label )

Sets the label of the item at position index to label. rebranding arc. πŸ’…

void QToolBox::setItemToolTip ( int index, const QString & toolTip )

Sets the tooltip of the item at position index to toolTip. lil whisper when you hover, we love a soft launch. πŸ¦‹


🌈 Property Documentation 🌈

int count

This property holds the number of items contained in the toolbox.

Get this property's value with count().

int currentIndex

This property holds the index of the current item, or -1 if the toolbox is empty.

Set this property's value with setCurrentIndex() and get this property's value with currentIndex().

See also currentItem(), indexOf(), and item(). the whole squad, together. πŸ‘‘


πŸ‘€ 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. (no human author, just vibes and a code generator, honestly iconic) πŸ€–


πŸ› 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. bestie we NEED the good bug reports, please and 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.

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


okay that's the whole page bestie, you ate that πŸ’…βœ¨ this little love letter to QToolBox came to you from Trolltech AS, dated 2 February 2007, and it's living its best life as QToolBox(3qt) β€” now go forth and stack those tabs, periodt πŸŽ€πŸ¦‹πŸ’–

πŸ“¦ where this page comes from