Loading...
Searching...
No Matches
TextLabel.hpp
1#pragma once
2#include <QLabel>
3
4#include <score_lib_base_export.h>
5class SCORE_LIB_BASE_EXPORT TextLabel final : public QLabel
6{
7public:
8 TextLabel() { setup(); }
9
10 ~TextLabel() override;
11
12 TextLabel(QWidget* parent)
13 : QLabel(parent)
14 {
15 setup();
16 }
17
18 TextLabel(const QString& str)
19 : TextLabel()
20 {
21 this->setText(str);
22 }
23
24 TextLabel(const QString& str, QWidget* parent)
25 : QLabel{parent}
26 {
27 setup();
28 this->setText(str);
29 }
30
31private:
32 void setup()
33 {
34 this->setTextInteractionFlags(Qt::NoTextInteraction);
35 this->setTextFormat(Qt::PlainText);
36 }
37};
Definition TextLabel.hpp:6