ROI handle size

107 views
Skip to first unread message

Peter Ercius

unread,
Dec 7, 2022, 3:16:02 PM12/7/22
to pyqtgraph
The ROI (and all sub classes) have a hard coded handleSize attribute set to 5 (pixels?). See here.

This is very small for large monitors and large images. I have not found a way to change this without class inheritance and overwriting the addHandle() function.

Is there a way to simply set the handleSize and then redraw the ROI?

Martin Chase

unread,
Dec 7, 2022, 4:19:24 PM12/7/22
to pyqt...@googlegroups.com
Hey Peter,

Yeah, that is often pretty small.You can update the existing handles with:
for handle in roi.getHandles():
handle.radius = 10
handle.buildPath()
    handle.update()

Peter Ercius

unread,
Dec 7, 2022, 6:51:23 PM12/7/22
to pyqtgraph
That is exactly what I was looking for. Thanks for the quick response!
Reply all
Reply to author
Forward
0 new messages