Canvas2D: Cleanup canvas2dtester example


Cleanup and optimize the code.
Supported by Claude Code and the qt-canvas2d skill.

Pick-to: 6.12
Change-Id: Icc1eac1bffc3b011e1fff0b2a1ef32bb88772938
Reviewed-by: Owais Akhtar <owais.akhtar@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
commit6e7f26776b38c58365f53634b2f1d56fb6dbbd5f
parent357e46f3ec3aa5aa7220ccec58adfc9e7d0ab7f0
authorKaj Grönholm <kaj.gronholm@qt.io>
committerKaj Grönholm <kaj.gronholm@qt.io>
commit timeFri, 2 Oct 2026 05:38:25 +0000