Replace obsolete method QLayout::setMargin with QLayout::setContentsMargins.

This commit is contained in:
Roman Telezhynskyi 2023-01-17 14:18:15 +03:00
parent 141373a903
commit 881f0b9826
4 changed files with 4 additions and 4 deletions

View file

@ -68,7 +68,7 @@ VFormulaPropertyEditor::VFormulaPropertyEditor(QWidget *parent)
// The layout (a horizontal layout)
auto* layout = new QHBoxLayout(this);
layout->setSpacing(3);
layout->setMargin(0);
layout->setContentsMargins(0, 0, 0, 0);
layout->addWidget(m_TextLabel);
// Spacer (this is needed for proper display of the label and button)
layout->addSpacerItem(new QSpacerItem(1000000000, 0, QSizePolicy::Expanding, QSizePolicy::Preferred));

View file

@ -62,7 +62,7 @@ VPE::VColorPropertyEditor::VColorPropertyEditor(QWidget *parent)
// The layout (a horizontal layout)
QHBoxLayout* layout = new QHBoxLayout(this);
layout->setSpacing(3);
layout->setMargin(0);
layout->setContentsMargins(0, 0, 0, 0);
layout->addWidget(ColorLabel);
layout->addWidget(TextLabel);
layout->addItem(Spacer);

View file

@ -61,7 +61,7 @@ VPE::VFileEditWidget::VFileEditWidget(QWidget *parent, bool is_directory)
// The layout (a horizontal layout)
QHBoxLayout* layout = new QHBoxLayout(this);
layout->setSpacing(0);
layout->setMargin(0);
layout->setContentsMargins(0, 0, 0, 0);
layout->addWidget(FileLineEdit);
layout->addWidget(ToolButton);

View file

@ -41,7 +41,7 @@ VPE::VShortcutEditWidget::VShortcutEditWidget(QWidget *parent)
// The layout (a horizontal layout)
QHBoxLayout* layout = new QHBoxLayout(this);
layout->setSpacing(0);
layout->setMargin(0);
layout->setContentsMargins(0, 0, 0, 0);
layout->addWidget(LineEdit);
}