QWidget::setContentsMargins is supported in Qt5

This commit is contained in:
Jean-Marc Lasgouttes 2023-03-05 21:37:01 +01:00
parent 7d78078838
commit 9156843ec2
2 changed files with 0 additions and 12 deletions

View File

@ -133,17 +133,9 @@ GuiCommandBuffer::GuiCommandBuffer(GuiView * view)
layout->addWidget(upPB, 0);
layout->addWidget(downPB, 0);
layout->addWidget(edit_, 10);
#if QT_VERSION < 0x060000
layout->setMargin(0);
#else
layout->setContentsMargins(0, 0, 0, 0);
#endif
top->addLayout(layout);
#if QT_VERSION < 0x060000
top->setMargin(0);
#else
top->setContentsMargins(0, 0, 0, 0);
#endif
setFocusProxy(edit_);
upPB->setEnabled(!history().empty());

View File

@ -103,11 +103,7 @@ IconPalette::IconPalette(QWidget * parent)
: QWidget(parent, Qt::Popup), tornoff_(false)
{
QVBoxLayout * v = new QVBoxLayout(this);
#if QT_VERSION < 0x060000
v->setMargin(0);
#else
v->setContentsMargins(0, 0, 0, 0);
#endif
v->setSpacing(0);
layout_ = new QGridLayout;
layout_->setSpacing(0);