Hi, i'm trying to built a custom cursor by assembling the current cursor and another QImage. Unfortunately i get weird behavior when i try to use
QPixmap cursor = QPixmap::fromWinHICON( (HICON) GetCursor() );
To copy to clipboard, switch view to plain text mode
If i instantly save the QPixmap "cursor" to disk i get the following result.

If you use the default windows cursor you can easily compare your cursor with the image, something is wrong there.
The image should be 32x32 but is only 20x20. I guess this might be connected with the fact that the cursor has it's hotspot at (10,10) so the hotspot is expected to be the icon center so some kind of downsampling occurs.
Note that i'm using the standard cursor in it's default size. I don't really know why QPixmap::fromWinHICON( (HICON) GetCursor() ); generates this small Version.
I currently have a workarround where i save the HICON to disc using winapi methods and then load the ico using
QPixmap cursorMap = QPixmap("default.ico");
To copy to clipboard, switch view to plain text mode
Does anyone have an idea why the fromWinHICON way does not work properly? Did i miss something?
Thanks a lot
I experience that using QT 4.6.2
Bookmarks