feat: include ai first step works
This commit is contained in:
24
example/qwfassoc/src/icon_utils.h
Normal file
24
example/qwfassoc/src/icon_utils.h
Normal file
@@ -0,0 +1,24 @@
|
||||
#pragma once
|
||||
#ifndef QWFASSOC_ICON_UTILS_H_
|
||||
#define QWFASSOC_ICON_UTILS_H_
|
||||
|
||||
#include <QPixmap>
|
||||
|
||||
#include <wfassoc++.h>
|
||||
|
||||
namespace qwfassoc {
|
||||
namespace icon_utils {
|
||||
|
||||
// Convert a wfassocpp::HICON handle (the C++ wrapper around wfassoc's opaque
|
||||
// icon handle) into a QPixmap suitable for use in Qt widgets.
|
||||
//
|
||||
// The conversion goes through QImage::fromHICON() (available since Qt 6.0 on
|
||||
// Windows) and then QPixmap::fromImage() using its rvalue-reference overload
|
||||
// so that no extra pixel buffer copy is performed. The returned pixmap is null
|
||||
// if the input handle is null.
|
||||
QPixmap fromHicon(wfassocpp::HICON handle);
|
||||
|
||||
} // namespace icon_utils
|
||||
} // namespace qwfassoc
|
||||
|
||||
#endif // QWFASSOC_ICON_UTILS_H_
|
||||
Reference in New Issue
Block a user