PDA

View Full Version : Creating Custom Arrow for label



ebsaith
18th June 2013, 14:21
Label within class
I can change the cursor icon from the Qt ui dropdown list.

I'm trying to add my own cursor a "circumpunct"
This is what I got:


setOverrideCursor(QCursor(QPixmap("CircumpunctCursor.bmp")));


Not sure where to place the code?
& is the code correct?

Thanks

ChrisW67
19th June 2013, 00:26
Are you trying to change the cursor for:


QCursor customCursor(QPixmap("CircumpunctCursor.bmp"));

// the entire program:
QApplication::setOverrideCursor(customCursor);
...
QApplication::restoreOverrideCursor();

// or just the one widget:
widget->setCursor(customCursor);

You are using a relative file path so this code will only work if the BMP file is found in the current working directory of the process.

ebsaith
19th June 2013, 07:30
Thanks, Works Like a dream