diff options
Diffstat (limited to 'examples/widgets/painting/shared/arthurstyle.cpp')
-rw-r--r-- | examples/widgets/painting/shared/arthurstyle.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/widgets/painting/shared/arthurstyle.cpp b/examples/widgets/painting/shared/arthurstyle.cpp index f4fc76bda6..3fc461bbd2 100644 --- a/examples/widgets/painting/shared/arthurstyle.cpp +++ b/examples/widgets/painting/shared/arthurstyle.cpp @@ -61,10 +61,10 @@ QPixmap cached(const QString &img) { - if (QPixmap *p = QPixmapCache::find(img)) - return *p; - QPixmap pm; + if (QPixmapCache::find(img, &pm)) + return pm; + pm = QPixmap::fromImage(QImage(img), Qt::OrderedDither | Qt::OrderedAlphaDither); if (pm.isNull()) return QPixmap(); @@ -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); } } |