PDA

View Full Version : Colored cursor



maverick_pol
14th May 2008, 11:34
Hi guys,

I would like to ask how to create a, lets say, red cursor? I have my own red crosscursor pixmap, but the QCursor looks as supports only black/white/transparent colors.
Thanks for any advice.

Kacper

wysota
14th May 2008, 22:50
Looks like you are right, at least according to the documentation.

On X11, Qt supports the Xcursor library, which allows for full color icon themes
This suggests full color cursors are not supported on other platforms. It might be a documentation flaw, though.

maverick_pol
15th May 2008, 08:51
Hi,

THanks. This topic sounds a bit similar to the "red button" problem. It's less problematic thought. : )
Ok, thanks for the comment.

Kacper

wysota
15th May 2008, 08:56
Coloured cursors should be available on all platforms, as when you drag an object, you can set a pixmap as a representation of the drag and it works on all platforms, as far as I know, so there are ways to have coloured cursors. Try peeking Qt's sources to find out more.

maverick_pol
15th May 2008, 12:16
I can always create an item representing the cursor and move it as needed, but was looking for a "typical" solution : )

Thanks