QtMac Namespace▲
-
Header: QtMac
-
Since: Qt 5.2
-
qmake: QT += macextras
Detailed Description▲
Function Documentation▲
int QtMac::applicationIconBadgeNumber()▲
Returns the value of the application icon a.k.a badge.
See Also▲
See also setApplicationIconBadgeNumber(), badgeLabelText()
QString QtMac::badgeLabelText()▲
CGContextRef QtMac::currentCGContext()▲
Returns the current CoreGraphics context.
QPixmap QtMac::fromCGImageRef(CGImageRef image)▲
Returns a QPixmap that is equivalent to the given image.
This function is not available in Qt 5.x until 5.0.2 and will return a null pixmap in earlier versions.
See Also▲
See also toCGImageRef(), Pixmap Conversion
bool QtMac::isMainWindow(QWindow *window)▲
Returns whether the given QWindow window is the application's main window
void QtMac::setApplicationIconBadgeNumber(int number)▲
Sets the value shown on the application icon a.k.a badge to number.
Unlike its macOS counterpart, only numbers can be used.
See Also▲
See also applicationIconBadgeNumber(), setBadgeLabelText()
void QtMac::setBadgeLabelText(const QString &text)▲
Sets the text shown on the application icon a.k.a badge.
This is generally used with numbers (e.g. number of unread emails); it can also show a string.
See Also▲
See also badgeLabelText()
CGImageRef QtMac::toCGImageRef(const QPixmap &pixmap)▲
Creates a CGImageRef equivalent to the QPixmap pixmap. Returns the CGImageRef handle.
It is the caller's responsibility to release the CGImageRef data after use.
This function is not available in Qt 5.x until 5.0.2 and will return NULL in earlier versions.
See Also▲
See also fromCGImageRef()
NSImage *QtMac::toNSImage(const QPixmap &pixmap)▲
Creates an NSImage equivalent to the QPixmap pixmap. Returns the NSImage handle.
It is the caller's responsibility to release the NSImage data after use.
Obsolete Members for QtMac▲
The following members of class QtMac are deprecated. We strongly advise against using them in new code.
Obsolete Function Documentation▲
QByteArray QtMac::fromNSData(const NSData *data)▲
This function is deprecated. We strongly advise against using it in new code.
Use QByteArray::fromNSData() instead.
NSData *QtMac::toNSData(const QByteArray &data)▲
This function is deprecated. We strongly advise against using it in new code.
Use QByteArray::toNSData() instead.