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 So it should be somewhere else I guess
↧
mousePressed equivalent of toggle button
↧