10 this->label =
new QLabel(
"");
11 this->resetButton =
new QPushButton(
"");
18 this->label->setText(QString::fromStdString(
message));
19 this->resetButton->setHidden(
false);
20 label->setToolTip(QString::fromStdString(error));
24 StatusLabel::resetLabel()
26 this->label->setText(QString::fromStdString(
""));
27 this->resetButton->setHidden(
true);
31 StatusLabel::setupUi()
33 QHBoxLayout* layout =
new QHBoxLayout();
34 layout->addWidget(resetButton);
35 layout->addWidget(label);
36 this->setLayout(layout);
37 layout->setStretch(1, 2);
38 label->setStyleSheet(
"QLabel { color : red; }");
39 this->resetButton->setHidden(
true);
41 label->setMinimumHeight(35);
42 label->setMaximumHeight(35);
44 QPixmap pixmap(
":/icons/delete.ico");
45 QIcon ButtonIcon(pixmap);
46 resetButton->setIcon(ButtonIcon);
47 resetButton->setIconSize(pixmap.rect().size() / 2);
49 connect(this->resetButton, &QPushButton::clicked,
this, &StatusLabel::resetLabel);