26 #include <QHBoxLayout>
33 setSizePolicy(QSizePolicy::Policy::Preferred, QSizePolicy::Policy::Preferred);
35 QHBoxLayout* box =
new QHBoxLayout(
this);
36 box->setContentsMargins(5, 0, 0, 0);
37 box->setAlignment(Qt::AlignLeft);
38 _label =
new QLabel(label);
39 box->addWidget(_label);
40 _edit =
new QLineEdit;
41 _edit->setText(default_text);
43 _label->setBuddy(_edit);
44 box->addWidget(_edit);
47 QSize LabelEditWidget::sizeHint()
const {
return QSize(200, 20); }