[Qt-interest] setDragCursor() in Snow Leopard not having any effect

Hostile Fork hostilefork at gmail.com
Sat Nov 21 20:23:49 CET 2009


Hello all,

I'm building an application under OS/X for the first time (it was developed under Kubuntu). 

setDragCursor() seems to ignore the pixmap I supply.  I tried both Cocoa and Carbon libraries, in 4.5 and 4.6 RC1 variants.  None worked for me.

It doesn't seem that any drag and drop examples that ship with Qt call setDragCursor.  So to reproduce the problem, change this line in the Examples / Qt / draganddrop / puzzle :

	http://qt.gitorious.org/qt/qt/blobs/5daca044cf8d185d9a09b2ec87cba10244e425e4/examples/draganddrop/puzzle/pieceslist.cpp#line118

...from:

	drag->setPixmap(pixmap);

...to instead say:

	drag->setDragCursor(pixmap.scaled(QSize(32, 32)), Qt::MoveAction);

I'd expect to see the cursor changed into a puzzle piece as you drag it.  This works in Kubuntu, even if you don't scale down the pixmap.

But on Snow Leopard it just looks like an arrow carrying a blob (the default "move" cursor when you haven't called setPixmap.)

Can anyone confirm this, and if so, if it is something that is planned to be fixed?

Thanks...!
---Brian



More information about the Qt-interest-old mailing list