QCustomPlot Discussion and Comments

[Feature Request]Return to overview

setCursor interface for QCPLayerable or QCPAbstractItem.

It's useful to set different QCursor.

Hi lancelot,

I've noted the feature request. Note that hit tests can be quite expensive when you've got complex objects in the plot. And with custom cursors somewhere in the plot surface, every mouse movement would need a full hit test like a click.
So while implementing it isn't too difficult, setting a custom cursor anywhere in the plot will cause those (potentially) expensive hit tests all the time. Of course I'd have a mechanism in place that notices when all cursors are default and then skip the hit tests on mouse move completely.

Hi DerManu,
Although I have implemented one, but hit test may be expensive.
see https://www.jianshu.com/p/c8ea0615c1fd
Cache items with custom QCursor may be helpful.
Hope see the feature soon.