QStatusBar(3qt)

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

✨ QStatusBar ✨

okay bestie, gather round, because today we're talking about QStatusBar(3qt) β€” the horizontal bar that's literally built for presenting status information πŸ’… she sits at the bottom of your window and just tells you things. icon status, no cap.


🌸 NAME 🌸

QStatusBar β€” a horizontal bar suitable for presenting status information. she's giving "I hold the tea AND the info" πŸ’–


πŸŽ€ SYNOPSIS πŸŽ€

#include <qstatusbar.h>

Inherits QWidget. yes queen, she's a widget, she's in the family 🫢

πŸ‘‘ Public Members

  • QStatusBar ( QWidget * parent = 0, const char * name = 0 )
  • virtual ~QStatusBar ()
  • virtual void addWidget ( QWidget * widget, int stretch = 0, bool permanent = FALSE )
  • virtual void removeWidget ( QWidget * widget )
  • void setSizeGripEnabled ( bool )
  • bool isSizeGripEnabled () const

πŸ’« Public Slots

  • void message ( const QString & message )
  • void message ( const QString & message, int ms )
  • void clear ()

πŸ“£ Signals

  • void messageChanged ( const QString & message )

⭐ Properties

  • bool sizeGripEnabled β€” whether the QSizeGrip in the bottom right of the status bar is enabled. that's the whole vibe, fr fr.

🧚 Protected Members

  • virtual void paintEvent ( QPaintEvent * )
  • void reformat ()
  • void hideOrShow ()

πŸ’– DESCRIPTION πŸ’–

The QStatusBar class provides a horizontal bar suitable for presenting status information. that's the whole job description and she does it flawlessly πŸ’…

Every status indicator she holds falls into one of three categories:

  • Temporary β€” briefly occupies most of the status bar. Used to explain tool tip texts or menu entries, for example. she's here for a good time, not a long time ✨
  • Normal β€” occupies part of the status bar and may be hidden by temporary messages. Used to display the page and line number in a word processor, for example. the reliable bestie 🫢
  • Permanent β€” is never hidden. Used for important mode indications, for example, some applications put a Caps Lock indicator in the status bar. she's not going ANYWHERE 😀

QStatusBar lets you display all three types of indicators. all of them. the whole trio. iconic.

To display a temporary message, call message() (perhaps by connecting a suitable signal to it). To remove a temporary message, call clear(). There are two variants of message(): one that displays the message until the next clear() or message() and one that has a time limit:

connect( loader, SIGNAL(progressMessage(const QString&)),
         statusBar(), SLOT(message(const QString&)) );
statusBar()->message("Loading...");  // Initial message
loader.loadStuff();                  // Emits progress messages
statusBar()->message("Done.", 2000); // Final message for 2 seconds

Normal and Permanent messages are displayed by creating a small widget and then adding it to the status bar with addWidget(). Widgets like QLabel, QProgressBar or even QToolButton are useful for adding to status bars. removeWidget() is used to remove widgets. bye girl πŸ‘‹

statusBar()->addWidget(new MyReadWriteIndication(statusBar()));

By default QStatusBar provides a QSizeGrip in the lower-right corner. You can disable it with setSizeGripEnabled(FALSE); β€” but like, why would you πŸ™ˆ

[Image Omitted]
[Image Omitted]

See also QToolBar, QMainWindow, QLabel, GUI Design Handbook: Status Bar, Main Window and Related Classes, and Help System. the friend group πŸ¦‹


🌈 MEMBER FUNCTION DOCUMENTATION 🌈

QStatusBar::QStatusBar ( QWidget * parent = 0, const char * name = 0 )

Constructs a status bar called name with parent parent and with a size grip. she arrives fully formed, grip and all πŸ’…

See also sizeGripEnabled.

QStatusBar::~QStatusBar () [virtual]

Destroys the status bar and frees any allocated resources and child widgets. she's logging off, but she's cleaning up after herself first β€” that's main character energy πŸ‘‘

void QStatusBar::addWidget ( QWidget * widget, int stretch = 0, bool permanent = FALSE ) [virtual]

Adds widget to this status bar. widget is reparented if it isn't already a child of the QStatusBar. adoption arc πŸ₯Ή

widget is permanently visible if permanent is TRUE and may be obscured by temporary messages if permanent is FALSE. The default is FALSE.

If permanent is TRUE, widget is located at the far right of the status bar. If permanent is FALSE (the default), widget is located just to the left of the first permanent widget. seating chart sorted πŸ“‹

stretch is used to compute a suitable size for widget as the status bar grows and shrinks. The default of 0 uses a minimum of space. low maintenance queen 🌸

This function may cause some flicker.

See also removeWidget().

void QStatusBar::clear () [slot]

Removes any temporary message being shown. gone, reduced to atoms πŸ’€

See also message().

void QStatusBar::hideOrShow () [protected]

Ensures that the right widgets are visible. Used by message() and clear(). she's the stage manager backstage making sure the right people are on stage 🎭

bool QStatusBar::isSizeGripEnabled () const

Returns TRUE if the QSizeGrip in the bottom right of the status bar is enabled; otherwise returns FALSE. See the "sizeGripEnabled" property for details. yes/no, slay/not slay ✨

void QStatusBar::message ( const QString & message ) [slot]

Hides the normal status indicators and displays message until clear() or another message() is called.

See also clear().

Example: regexptester/regexptester.cpp. shoutout to the example file πŸ“

void QStatusBar::message ( const QString & message, int ms ) [slot]

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

Hides the normal status indications and displays message for ms milli-seconds or until clear() or another message() is called, whichever occurs first. first one wins, no overtime ⏰

void QStatusBar::messageChanged ( const QString & message ) [signal]

This signal is emitted when the temporary status messages changes. message is the new temporary message, and is a null-string when the message has been removed. not me getting notified every time the message changes πŸ“£

See also message() and clear().

void QStatusBar::paintEvent ( QPaintEvent * ) [virtual protected]

Shows the temporary message, if appropriate.

Reimplemented from QWidget.

void QStatusBar::reformat () [protected]

Changes the status bar's appearance to account for item changes. Special subclasses may need this, but geometry management will usually take care of any necessary rearrangements. glow-up handled automatically, don't stress πŸ’…

void QStatusBar::removeWidget ( QWidget * widget ) [virtual]

Removes widget from the status bar.

This function may cause some flicker.

Note that widget is not deleted. she's out of the group chat but she's still alive, bestie 😭

See also addWidget().

void QStatusBar::setSizeGripEnabled ( bool )

Sets whether the QSizeGrip in the bottom right of the status bar is enabled. See the "sizeGripEnabled" property for details.


πŸ¦‹ Property Documentation πŸ¦‹

bool sizeGripEnabled

This property holds whether the QSizeGrip in the bottom right of the status bar is enabled.

Enables or disables the QSizeGrip in the bottom right of the status bar. By default, the size grip is enabled. on by default, as she should be ⭐

Set this property's value with setSizeGripEnabled() and get this property's value with isSizeGripEnabled(). setter and getter, the classic duo 🫢


πŸ”₯ SEE ALSO πŸ”₯


Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the license file included in the distribution for a complete license statement. legal stuff, but make it cute πŸ“œ


🌟 AUTHOR 🌟

Generated automatically from the source code. no human author, just vibes and a script πŸ€–βœ¨


πŸ’€ 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 WANT your bug reports, they're literally gifts 🎁

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. yes this is the unofficial cute version, the HTML is the canon one πŸ‘‘

If you find errors in this manual page, please report them to qt-bugs@trolltech.com. Please include the name of the manual page (qstatusbar.3qt) and the Qt version (3.3.8). don't forget the receipts, they need them to fix it 🧾


and that's the whole page, bestie!! πŸŽ€ this one came from Trolltech AS and it's dated 2 February 2007 β€” yeah she's vintage, she's a classic, she's still serving πŸ’…πŸ¦‹βœ¨

πŸ“¦ where this page comes from