I think your mousePressed function is executed twice, maybe in the fix you found? Because this code seems to be fine, it worked fine for me on an empty project Image may be NSFW.
Clik here to view. So it should be somewhere else I guess
↧
mousePressed equivalent of toggle button
↧