Commit fc05f6df authored by Laurent Montel's avatar Laurent Montel 😁

Assign parent directly. Remove setLayout(...) when not necessary

parent cef70300
......@@ -138,10 +138,9 @@ TransactionItem::TransactionItem(QWidget *parent, ProgressItem *item, bool first
, mCancelButton(nullptr)
, mItem(item)
{
QVBoxLayout *vboxLayout = new QVBoxLayout;
QVBoxLayout *vboxLayout = new QVBoxLayout(this);
vboxLayout->setSpacing(2);
vboxLayout->setMargin(2);
setLayout(vboxLayout);
setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed));
mFrame = new QFrame(this);
......
......@@ -48,11 +48,10 @@ TagWidget::TagWidget(QWidget *parent)
{
d->mTagWidget = new Akonadi::TagWidget(this);
connect(d->mTagWidget, &Akonadi::TagWidget::selectionChanged, this, &TagWidget::onSelectionChanged);
QHBoxLayout *l = new QHBoxLayout;
QHBoxLayout *l = new QHBoxLayout(this);
l->setMargin(0);
l->setSpacing(0);
l->addWidget(d->mTagWidget);
setLayout(l);
}
TagWidget::~TagWidget()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment