diff --git a/src/plugins/baremetal/baremetalgdbcommandsdeploystep.cpp b/src/plugins/baremetal/baremetalgdbcommandsdeploystep.cpp index 60f34a47e74..dfcf3ae87de 100644 --- a/src/plugins/baremetal/baremetalgdbcommandsdeploystep.cpp +++ b/src/plugins/baremetal/baremetalgdbcommandsdeploystep.cpp @@ -40,7 +40,7 @@ BareMetalGdbCommandsDeployStepWidget::BareMetalGdbCommandsDeployStepWidget(BareM : BuildStepConfigWidget(&step), m_step(step) { const auto fl = new QFormLayout(this); - fl->setMargin(0); + fl->setContentsMargins(0, 0, 0, 0); fl->setFieldGrowthPolicy(QFormLayout::ExpandingFieldsGrow); setLayout(fl); m_commands = new QPlainTextEdit(this); diff --git a/src/plugins/cppeditor/cppincludehierarchy.cpp b/src/plugins/cppeditor/cppincludehierarchy.cpp index 41985bd5553..8ea60a76097 100644 --- a/src/plugins/cppeditor/cppincludehierarchy.cpp +++ b/src/plugins/cppeditor/cppincludehierarchy.cpp @@ -381,7 +381,7 @@ CppIncludeHierarchyWidget::CppIncludeHierarchyWidget() m_delegate.setAnnotationRole(AnnotationRole); m_inspectedFile = new TextEditorLinkLabel(this); - m_inspectedFile->setMargin(5); + m_inspectedFile->setContentsMargins(5, 5, 5, 5); m_treeView = new CppIncludeHierarchyTreeView; m_treeView->setModel(&m_model); diff --git a/src/plugins/cppeditor/cpptypehierarchy.cpp b/src/plugins/cppeditor/cpptypehierarchy.cpp index 081a0c5e981..c4478f2d521 100644 --- a/src/plugins/cppeditor/cpptypehierarchy.cpp +++ b/src/plugins/cppeditor/cpptypehierarchy.cpp @@ -91,7 +91,7 @@ namespace Internal { CppTypeHierarchyWidget::CppTypeHierarchyWidget() { m_inspectedClass = new TextEditor::TextEditorLinkLabel(this); - m_inspectedClass->setMargin(5); + m_inspectedClass->setContentsMargins(5, 5, 5, 5); m_model = new CppTypeHierarchyModel(this); m_treeView = new NavigationTreeView(this); m_treeView->setActivationMode(SingleClickActivation); diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp index e37c0df132b..0fbb1fb7350 100644 --- a/src/plugins/debugger/debuggerplugin.cpp +++ b/src/plugins/debugger/debuggerplugin.cpp @@ -832,7 +832,7 @@ DebuggerPluginPrivate::DebuggerPluginPrivate(const QStringList &arguments) QTC_ASSERT(vbox, return); auto label = new QLabel(widget); label->setText(text); - label->setMargin(6); + label->setContentsMargins(6, 6, 6, 6); vbox->insertWidget(0, label); }; diff --git a/src/plugins/projectexplorer/miniprojecttargetselector.cpp b/src/plugins/projectexplorer/miniprojecttargetselector.cpp index 372712f8bc9..7face6a43a2 100644 --- a/src/plugins/projectexplorer/miniprojecttargetselector.cpp +++ b/src/plugins/projectexplorer/miniprojecttargetselector.cpp @@ -725,7 +725,7 @@ MiniProjectTargetSelector::MiniProjectTargetSelector(QAction *targetSelectorActi m_kitAreaWidget = new KitAreaWidget(this); m_summaryLabel = new QLabel(this); - m_summaryLabel->setMargin(3); + m_summaryLabel->setContentsMargins(3, 3, 3, 3); m_summaryLabel->setAlignment(Qt::AlignLeft | Qt::AlignTop); m_summaryLabel->setStyleSheet(QString::fromLatin1("background: %1;") .arg(creatorTheme()->color(Theme::MiniProjectTargetSelectorSummaryBackgroundColor).name())); diff --git a/src/plugins/projectexplorer/targetsettingspanel.cpp b/src/plugins/projectexplorer/targetsettingspanel.cpp index aae0e67b37c..3bb35bfe75d 100644 --- a/src/plugins/projectexplorer/targetsettingspanel.cpp +++ b/src/plugins/projectexplorer/targetsettingspanel.cpp @@ -217,7 +217,7 @@ void TargetGroupItemPrivate::ensureWidget() f.setPointSizeF(f.pointSizeF() * 1.4); f.setBold(true); label->setFont(f); - label->setMargin(10); + label->setContentsMargins(10, 10, 10, 10); label->setAlignment(Qt::AlignTop); auto layout = new QVBoxLayout(m_noKitLabel); diff --git a/tests/manual/pluginview/plugindialog.cpp b/tests/manual/pluginview/plugindialog.cpp index 4cb069ff884..550852ed529 100644 --- a/tests/manual/pluginview/plugindialog.cpp +++ b/tests/manual/pluginview/plugindialog.cpp @@ -44,13 +44,13 @@ PluginDialog::PluginDialog() : m_view(new ExtensionSystem::PluginView(this)) { QVBoxLayout *vl = new QVBoxLayout(this); - vl->setMargin(0); + vl->setContentsMargins(0, 0, 0, 0); vl->setSpacing(0); vl->addWidget(m_view); QHBoxLayout *hl = new QHBoxLayout; vl->addLayout(hl); - hl->setMargin(0); + hl->setContentsMargins(0, 0, 0, 0); hl->setSpacing(6); m_detailsButton = new QPushButton(tr("Details"), this); m_errorDetailsButton = new QPushButton(tr("Error Details"), this);