summaryrefslogtreecommitdiffstats
path: root/examples/widgets/painting
diff options
context:
space:
mode:
Diffstat (limited to 'examples/widgets/painting')
-rw-r--r--examples/widgets/painting/deform/pathdeform.cpp4
-rw-r--r--examples/widgets/painting/fontsampler/mainwindow.cpp2
-rw-r--r--examples/widgets/painting/gradients/gradients.cpp2
-rw-r--r--examples/widgets/painting/pathstroke/pathstroke.cpp14
-rw-r--r--examples/widgets/painting/shared/arthurstyle.cpp4
5 files changed, 13 insertions, 13 deletions
diff --git a/examples/widgets/painting/deform/pathdeform.cpp b/examples/widgets/painting/deform/pathdeform.cpp
index 0eda76a831..64e81f8cab 100644
--- a/examples/widgets/painting/deform/pathdeform.cpp
+++ b/examples/widgets/painting/deform/pathdeform.cpp
@@ -150,7 +150,7 @@ void PathDeformControls::layoutForDesktop()
QVBoxLayout * mainLayout = new QVBoxLayout(this);
mainLayout->addWidget(mainGroup);
- mainLayout->setMargin(0);
+ mainLayout->setContentsMargins(QMargins());
connect(radiusSlider, &QAbstractSlider::valueChanged, m_renderer, &PathDeformRenderer::setRadius);
connect(deformSlider, &QAbstractSlider::valueChanged, m_renderer, &PathDeformRenderer::setIntensity);
@@ -211,7 +211,7 @@ void PathDeformControls::layoutForSmallScreen()
QGridLayout *mainGroupLayout = new QGridLayout(mainGroup);
- mainGroupLayout->setMargin(0);
+ mainGroupLayout->setContentsMargins(QMargins());
mainGroupLayout->addWidget(radiusLabel, 0, 0, Qt::AlignRight);
mainGroupLayout->addWidget(radiusSlider, 0, 1);
mainGroupLayout->addWidget(deformLabel, 1, 0, Qt::AlignRight);
diff --git a/examples/widgets/painting/fontsampler/mainwindow.cpp b/examples/widgets/painting/fontsampler/mainwindow.cpp
index a464eee3ff..b3304b4b6d 100644
--- a/examples/widgets/painting/fontsampler/mainwindow.cpp
+++ b/examples/widgets/painting/fontsampler/mainwindow.cpp
@@ -78,7 +78,7 @@ MainWindow::MainWindow(QWidget *parent)
connect(fontTree, &QTreeWidget::itemChanged,
this, &MainWindow::updateStyles);
- fontTree->setItemSelected(fontTree->topLevelItem(0), true);
+ fontTree->topLevelItem(0)->setSelected(true);
showFont(fontTree->topLevelItem(0));
}
diff --git a/examples/widgets/painting/gradients/gradients.cpp b/examples/widgets/painting/gradients/gradients.cpp
index fd6eaeb0d9..7abaef771b 100644
--- a/examples/widgets/painting/gradients/gradients.cpp
+++ b/examples/widgets/painting/gradients/gradients.cpp
@@ -180,7 +180,7 @@ GradientEditor::GradientEditor(QWidget *parent)
{
QVBoxLayout *vbox = new QVBoxLayout(this);
vbox->setSpacing(1);
- vbox->setMargin(1);
+ vbox->setContentsMargins(1, 1, 1, 1);
m_red_shade = new ShadeWidget(ShadeWidget::RedShade, this);
m_green_shade = new ShadeWidget(ShadeWidget::GreenShade, this);
diff --git a/examples/widgets/painting/pathstroke/pathstroke.cpp b/examples/widgets/painting/pathstroke/pathstroke.cpp
index cad0b8732c..03e55bb2a2 100644
--- a/examples/widgets/painting/pathstroke/pathstroke.cpp
+++ b/examples/widgets/painting/pathstroke/pathstroke.cpp
@@ -227,11 +227,11 @@ void PathStrokeControls::layoutForDesktop()
penWidthLayout->addWidget(penWidth);
QVBoxLayout * mainLayout = new QVBoxLayout(this);
- mainLayout->setMargin(0);
+ mainLayout->setContentsMargins(QMargins());
mainLayout->addWidget(mainGroup);
QVBoxLayout *mainGroupLayout = new QVBoxLayout(mainGroup);
- mainGroupLayout->setMargin(3);
+ mainGroupLayout->setContentsMargins(3, 3, 3, 3);
mainGroupLayout->addWidget(m_capGroup);
mainGroupLayout->addWidget(m_joinGroup);
mainGroupLayout->addWidget(m_styleGroup);
@@ -270,10 +270,10 @@ void PathStrokeControls::layoutForSmallScreens()
{
createCommonControls(this);
- m_capGroup->layout()->setMargin(0);
- m_joinGroup->layout()->setMargin(0);
- m_styleGroup->layout()->setMargin(0);
- m_pathModeGroup->layout()->setMargin(0);
+ m_capGroup->layout()->setContentsMargins(QMargins());
+ m_joinGroup->layout()->setContentsMargins(QMargins());
+ m_styleGroup->layout()->setContentsMargins(QMargins());
+ m_pathModeGroup->layout()->setContentsMargins(QMargins());
QPushButton* okBtn = new QPushButton(tr("OK"), this);
okBtn->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
@@ -313,7 +313,7 @@ void PathStrokeControls::layoutForSmallScreens()
rightLayout->addWidget(m_pathModeGroup);
QGridLayout *mainLayout = new QGridLayout(this);
- mainLayout->setMargin(0);
+ mainLayout->setContentsMargins(QMargins());
// Add spacers around the form items so we don't look stupid at higher resolutions
mainLayout->addItem(new QSpacerItem(0,0), 0, 0, 1, 4);
diff --git a/examples/widgets/painting/shared/arthurstyle.cpp b/examples/widgets/painting/shared/arthurstyle.cpp
index 3df9d9a6dc..3fc461bbd2 100644
--- a/examples/widgets/painting/shared/arthurstyle.cpp
+++ b/examples/widgets/painting/shared/arthurstyle.cpp
@@ -443,9 +443,9 @@ void ArthurStyle::polish(QWidget *widget)
if (widget->layout() && qobject_cast<QGroupBox *>(widget)) {
if (widget->findChildren<QGroupBox *>().size() == 0) {
widget->layout()->setSpacing(0);
- widget->layout()->setMargin(12);
+ widget->layout()->setContentsMargins(12, 12, 12, 12);
} else {
- widget->layout()->setMargin(13);
+ widget->layout()->setContentsMargins(13, 13, 13, 13);
}
}