The QtMac namespace contains miscellaneous functionality specific to the macOS and iOS operating systems. 更多...
头: | #include <QtMac> |
qmake: | QT += macextras |
Since: | Qt 5.2 |
This namespace was introduced in Qt 5.2.
int | applicationIconBadgeNumber () |
CGContextRef | currentCGContext () |
QPixmap | fromCGImageRef (CGImageRef image ) |
void | setApplicationIconBadgeNumber (int number ) |
CGImageRef | toCGImageRef (const QPixmap & pixmap ) |
Returns the value of the application icon a.k.a badge.
另请参阅 setApplicationIconBadgeNumber () and badgeLabelText().
Returns the current CoreGraphics context.
返回 QPixmap 相当于给定 image .
This function is not available in Qt 5.x until 5.0.2 and will return a null pixmap in earlier versions.
另请参阅 toCGImageRef () 和 像素图转换 .
Sets the value shown on the application icon a.k.a badge to number .
Unlike its macOS counterpart, only numbers can be used.
另请参阅 applicationIconBadgeNumber () and setBadgeLabelText().
创建
CGImageRef
equivalent to the
QPixmap
pixmap
。返回
CGImageRef
句柄。
It is the caller's responsibility to release the
CGImageRef
数据在使用后。
This function is not available in Qt 5.x until 5.0.2 and will return NULL in earlier versions.
另请参阅 fromCGImageRef ().