aboutsummaryrefslogtreecommitdiffstats
path: root/src/macextras/qmactoolbaritem.mm
diff options
context:
space:
mode:
Diffstat (limited to 'src/macextras/qmactoolbaritem.mm')
-rw-r--r--src/macextras/qmactoolbaritem.mm3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/macextras/qmactoolbaritem.mm b/src/macextras/qmactoolbaritem.mm
index b215bd8..3bb3a5a 100644
--- a/src/macextras/qmactoolbaritem.mm
+++ b/src/macextras/qmactoolbaritem.mm
@@ -169,7 +169,8 @@ void QMacToolBarItem::setIcon(const QIcon &icon)
return;
if (pixmap.isNull() == false) {
- [d->toolbarItem setImage: QtMac::toNSImage(pixmap)];
+ NSImage *image = [[NSImage alloc] initWithCGImage:pixmap.toImage().toCGImage() size:NSZeroSize];
+ d->toolbarItem.image = [image autorelease];
}
}