Is it possible to change the cursor tool icon via pyqt/ krita API?

Sadly i cant seem to take a screen shot of it.

What I mean is when you choose fill/bucket fill or when you are on on eraser mode, the cursor has this tool icons showing to denote what tool is being used.

is it possible to change that via pyqt/ krita API and change it back again.

Thank you.

It is possible to change the QCursor. Krita’s cursor icon filenames and their hotspots are in libs/widgetutils/kis_cursor.cc.

# Temporarily override the cursor
QApplication.setOverrideCursor(QCursor(QPixmap(":/cursor-eraser.xpm"), 2, 2))
# Switch it back
QApplication.restoreOverrideCursor()

However, that involves using the cursor stack, which could get confused if something else modifies it in the meantime.

1 Like

Thank you. Its worth trying at the very least.

I also did check ways to detect if a tool have been activated. Though I’m not really sure how to implement whats in my head , i thought i need to look into the cursor thing for now.

Thank you.