File indexing completed on 2024-12-01 04:37:01
0001 /* 0002 SPDX-FileCopyrightText: 2020-2024 Laurent Montel <montel@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #include "readonlylineeditwidget.h" 0008 #include <QLabel> 0009 #include <QVBoxLayout> 0010 ReadOnlyLineEditWidget::ReadOnlyLineEditWidget(QWidget *parent) 0011 : QWidget(parent) 0012 , mLabel(new QLabel(this)) 0013 { 0014 auto mainLayout = new QVBoxLayout(this); 0015 mainLayout->setObjectName(QStringLiteral("mainLayout")); 0016 mainLayout->setContentsMargins({}); 0017 0018 mLabel->setObjectName(QStringLiteral("label")); 0019 mainLayout->addWidget(mLabel); 0020 QFont font = mLabel->font(); 0021 font.setBold(true); 0022 font.setItalic(true); 0023 mLabel->setFont(font); 0024 } 0025 0026 ReadOnlyLineEditWidget::~ReadOnlyLineEditWidget() = default; 0027 0028 void ReadOnlyLineEditWidget::setMessage(const QString &str) 0029 { 0030 mLabel->setText(str); 0031 } 0032 0033 #include "moc_readonlylineeditwidget.cpp"