QuPath was written by a researcher who was (and is) a big fan of ImageJ, and who has used it rather a lot. Because of this, there is a considerable amount of ImageJ inspiration that has gone into ...
Some built-in examples of possibly-useful scripts are distributed with QuPath under Automate → Show sample scripts. These can then be opened up in a script editor and run or modified as required.
Some results have been hidden because they may be inaccessible to you
Show inaccessible results