Files
GUI/src/components/VerticalTextToolButton.h

25 lines
531 B
C
Raw Normal View History

2022-01-12 11:24:37 +08:00
//
// Created by Krad on 2022/1/11.
//
#ifndef GUI_VERTICALTEXTTOOLBUTTON_H
#define GUI_VERTICALTEXTTOOLBUTTON_H
#include <QToolButton>
class VerticalTextToolButton: public QToolButton {
public:
explicit VerticalTextToolButton(QWidget* parent = nullptr);
2022-06-07 15:06:29 +08:00
~VerticalTextToolButton() override = default;
void setVerticalText(const QString& text){
mVerticalText = text;
2022-01-12 11:24:37 +08:00
}
protected:
2022-06-07 15:06:29 +08:00
void paintEvent(QPaintEvent* e) override;
2022-01-12 11:24:37 +08:00
private:
2022-06-07 15:06:29 +08:00
QString mVerticalText;
2022-01-12 11:24:37 +08:00
};
#endif //GUI_VERTICALTEXTTOOLBUTTON_H