Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qstatusbar.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QSTATUSBAR_H
5#define QSTATUSBAR_H
6
7#include <QtWidgets/qtwidgetsglobal.h>
8#include <QtWidgets/qwidget.h>
9
11
12QT_BEGIN_NAMESPACE
13
14class QStatusBarPrivate;
15
16class Q_WIDGETS_EXPORT QStatusBar: public QWidget
17{
18 Q_OBJECT
19
20 Q_PROPERTY(bool sizeGripEnabled READ isSizeGripEnabled WRITE setSizeGripEnabled)
21
22public:
23 explicit QStatusBar(QWidget *parent = nullptr);
24 virtual ~QStatusBar();
25
26 void addWidget(QWidget *widget, int stretch = 0);
27 int insertWidget(int index, QWidget *widget, int stretch = 0);
28 void addPermanentWidget(QWidget *widget, int stretch = 0);
29 int insertPermanentWidget(int index, QWidget *widget, int stretch = 0);
30 void removeWidget(QWidget *widget);
31
32 void setSizeGripEnabled(bool);
33 bool isSizeGripEnabled() const;
34
35 QString currentMessage() const;
36
37public Q_SLOTS:
38 void showMessage(const QString &text, int timeout = 0);
39 void clearMessage();
40
41
42Q_SIGNALS:
43 void messageChanged(const QString &text);
44
45protected:
46 void showEvent(QShowEvent *) override;
47 void paintEvent(QPaintEvent *) override;
48 void resizeEvent(QResizeEvent *) override;
49
50 void reformat();
51 void hideOrShow();
52 bool event(QEvent *) override;
53
54private:
55 Q_DISABLE_COPY(QStatusBar)
56 Q_DECLARE_PRIVATE(QStatusBar)
57};
58
59QT_END_NAMESPACE
60
61#endif // QSTATUSBAR_H
Definition qlist.h:80
friend class QWidget
Definition qpainter.h:423
QRect messageRect() const
int indexToLastNonPermanentWidget() const
QList< SBItem > items
QBoxLayout * box
The QStatusBar class provides a horizontal bar suitable for presenting status information.
Definition qstatusbar.h:17
Combined button and popup list for selecting options.
QT_REQUIRE_CONFIG(statusbar)