25 lines
531 B
C++
25 lines
531 B
C++
//
|
|
// 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);
|
|
~VerticalTextToolButton() override = default;
|
|
void setVerticalText(const QString& text){
|
|
mVerticalText = text;
|
|
}
|
|
protected:
|
|
void paintEvent(QPaintEvent* e) override;
|
|
|
|
private:
|
|
QString mVerticalText;
|
|
};
|
|
|
|
|
|
#endif //GUI_VERTICALTEXTTOOLBUTTON_H
|