← Back to team overview

destiny team mailing list archive

Sleuths - Mouse Cursor ATTN: Tom

 

Hey Tom,

I looked into this, and it should be as simple as this:

QCursor myCursor(thePixmap);
myWidget->setCursor(myCursor);

As you see, you set the cursor per-widget. So, the way I would do this is as
follows:

   - Create a QCursor member variable in the Sleuths scene window. This
   isn't entirely necessary, but it allows us to change the cursor from
   anywhere and makes it nice and tidy to have it be a member variable.
   - Each time a tool is selected, setup the QCursor using the appropriate
   pixmap and set the widgets cursor to that cursor. There are already slot
   functions that get called when you select a tool, so you'd just add the code
   there.

Let me know if you have any questions.

*API Reference*

   - http://doc.trolltech.com/4.6/qcursor.html
   - http://doc.trolltech.com/4.6/qwidget.html#cursor-prop


Zach J. Elko
Ball State University Unified Technology Support
Certified Hardware & Software Technician