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) // The layout (a horizontal layout)
auto* layout = new QHBoxLayout(this); auto* layout = new QHBoxLayout(this);
layout->setSpacing(3); layout->setSpacing(3);
layout->setMargin(0); layout->setContentsMargins(0, 0, 0, 0);
layout->addWidget(m_TextLabel); layout->addWidget(m_TextLabel);
// Spacer (this is needed for proper display of the label and button) // Spacer (this is needed for proper display of the label and button)
layout->addSpacerItem(new QSpacerItem(1000000000, 0, QSizePolicy::Expanding, QSizePolicy::Preferred)); 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) // The layout (a horizontal layout)
QHBoxLayout* layout = new QHBoxLayout(this); QHBoxLayout* layout = new QHBoxLayout(this);
layout->setSpacing(3); layout->setSpacing(3);
layout->setMargin(0); layout->setContentsMargins(0, 0, 0, 0);
layout->addWidget(ColorLabel); layout->addWidget(ColorLabel);
layout->addWidget(TextLabel); layout->addWidget(TextLabel);
layout->addItem(Spacer); layout->addItem(Spacer);

View File

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

View File

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