Also wrap QImage::fromHBITMAP()

This commit is contained in:
Kovid Goyal 2023-01-04 19:57:18 +05:30
parent 60fa1b8b84
commit 8874ff73aa
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
3 changed files with 12 additions and 0 deletions

View File

@ -143,3 +143,13 @@ image_from_hicon(void* hicon) {
return QImage();
#endif
}
QImage
image_from_hbitmap(void* hbitmap) {
#ifdef Q_OS_WIN
return QImage::fromHBITMAP((HBITMAP)hbitmap);
#else
(void)hibitmap;
return QImage();
#endif
}

View File

@ -163,3 +163,4 @@ QMenu* menu_for_action(const QAction *ac);
void set_image_allocation_limit(int megabytes);
int get_image_allocation_limit();
QImage image_from_hicon(void* hicon);
QImage image_from_hbitmap(void* hbitmap);

View File

@ -90,3 +90,4 @@ QMenu* menu_for_action(const QAction *ac);
void set_image_allocation_limit(int megabytes);
int get_image_allocation_limit();
QImage image_from_hicon(void*);
QImage image_from_hbitmap(void*);