1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
#pragma once #include <QPushButton> #include <QToolButton> class QLabel; class LabeledToolButton : public QToolButton { Q_OBJECT QLabel * m_label; public: LabeledToolButton(QWidget * parent = 0); QString text() const; void setText(const QString & text); virtual QSize sizeHint() const; protected: void resizeEvent(QResizeEvent * event); };