Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
文件声明该功能可用,但是我收到声明错误
img = QPixmap::fromWinHBITMAP(hRetVal).toImage();
错误是
error C3861: 'fromWinHBITMAP': identifier not found
我试过包括
#include <QPixmap>
但是我仍然得到那个。有什么建议么 ?
它被移到 QtWin 命名空间中。
#include <QtWin> HBITMAP bitmap = ... QtWin::HBitmapFormat format = ... QPixmap pixmap = QtWin::fromHBITMAP(bitmap, format);
http://doc.qt.io/qt-5/qtwin.html#fromHBITMAP