Skip to content
This repository has been archived by the owner on Apr 17, 2022. It is now read-only.

'Cannot create bitmap cursor' with qt backend #3562

Closed
wzdev-ci opened this issue Jun 22, 2012 · 8 comments
Closed

'Cannot create bitmap cursor' with qt backend #3562

wzdev-ci opened this issue Jun 22, 2012 · 8 comments

Comments

@wzdev-ci
Copy link
Contributor

keyword_cursor_qt resolution_fixed type_bug | by fishdude@...


Configuring wz with --with-backend=qt and having qt 4.8.2 installed, i get
'QCursor: Cannot create bitmap cursor; invalid bitmap(s)'
18 times when starting the game.
Inside the game i have only the system cursor available, as it could be guessed.

Cursors are working with SDL backend and have worked with qt backend before.
Maybe there was a change from 4.8.1 to 4.8.2.


Issue migrated from trac:3562 at 2022-04-16 09:54:32 -0700

@wzdev-ci
Copy link
Contributor Author

fishdude@... commented


QImageReader is not able to read() from intfac5.png in WzMainWindow::loadCursor() in wzapp_qt.cpp

It gives an 'InvalidDataError'.
QT doc says:
"The image data was invalid, and QImageReader was unable to read an image from it. The can happen if the image file is damaged."

But intfac5.png can be viewed with gwenview(qt based) and imagemagick without problems.

@wzdev-ci
Copy link
Contributor Author

fishdude@... commented


The issue seems to be a lookup issue of intfac5.png.
In wzapp_qt.cpp it's loaded from base.wz, using the following path: 'wz::images/intfac5.png'.
However, when replacing this with an absolute path to the image the problem is gone.
Therefore it seems as if there is something wrong with base.wz

@wzdev-ci
Copy link
Contributor Author

Cyp changed status from new to closed

@wzdev-ci
Copy link
Contributor Author

Cyp changed resolution from `` to fixed

@wzdev-ci
Copy link
Contributor Author

Cyp commented


qt: Use QImage instead of QImageReader to load mouse cursor images.

Some combination of QImageReader, QImage, QPixmap, QCursor and the wzfs wz:: virtual file system apparently doesn't
work in Qt 4.8.2 (but works in Qt 4.8.1).

The following error was printed (multiple times) to the shell:
QCursor: Cannot create bitmap cursor; invalid bitmap(s)

Fixes #3562.

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Aug 1, 2012

Cyp commented


qt: Use QImage instead of QImageReader to load mouse cursor images.

Some combination of QImageReader, QImage, QPixmap, QCursor and the wzfs wz:: virtual file system apparently doesn't
work in Qt 4.8.2 (but works in Qt 4.8.1).

The following error was printed (multiple times) to the shell:
QCursor: Cannot create bitmap cursor; invalid bitmap(s)

Fixes #3562.

2 similar comments
@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Aug 2, 2012

Cyp commented


qt: Use QImage instead of QImageReader to load mouse cursor images.

Some combination of QImageReader, QImage, QPixmap, QCursor and the wzfs wz:: virtual file system apparently doesn't
work in Qt 4.8.2 (but works in Qt 4.8.1).

The following error was printed (multiple times) to the shell:
QCursor: Cannot create bitmap cursor; invalid bitmap(s)

Fixes #3562.

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Aug 4, 2012

Cyp commented


qt: Use QImage instead of QImageReader to load mouse cursor images.

Some combination of QImageReader, QImage, QPixmap, QCursor and the wzfs wz:: virtual file system apparently doesn't
work in Qt 4.8.2 (but works in Qt 4.8.1).

The following error was printed (multiple times) to the shell:
QCursor: Cannot create bitmap cursor; invalid bitmap(s)

Fixes #3562.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant