The QtMac namespace contains miscellaneous functionality specific to the macOS and iOS operating systems. More...
Header: | #include <QtMac> |
qmake: | QT += macextras |
Since: | Qt 5.2 |
int | applicationIconBadgeNumber() |
QString | badgeLabelText() |
CGContextRef | currentCGContext() |
QPixmap | fromCGImageRef(CGImageRef image) |
bool | isMainWindow(QWindow *window) |
void | setApplicationIconBadgeNumber(int number) |
void | setBadgeLabelText(const QString &text) |
CGImageRef | toCGImageRef(const QPixmap &pixmap) |
NSImage * | toNSImage(const QPixmap &pixmap) |
The QtMac namespace contains miscellaneous functionality specific to the macOS and iOS operating systems.
Returns the value of the application icon a.k.a badge.
See also setApplicationIconBadgeNumber() and badgeLabelText().
Returns the text of the application icon a.k.a badge.
See also setBadgeLabelText().
Returns the current CoreGraphics context.
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 toCGImageRef() and Pixmap Conversion.
Returns whether the given QWindow window is the application's main window
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 applicationIconBadgeNumber() and setBadgeLabelText().
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 badgeLabelText().
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 fromCGImageRef().
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.
As part of the free Business evaluation, we offer a free welcome call for companies, to talk about your requirements, and how the Felgo SDK & Services can help you. Just sign up and schedule your call.
Sign up now to start your free Business evaluation: