In late 2022 it was updated so instead of onToplevelCreated: { it's now onToplevelCreated: (toplevel, xdgSurface) => {. The original example is under the BSD 3-clause, so I need to specify that when I paste it in.
Here's the change that I can link to: https://code.qt.io/cgit/qt/qtwayland.git/commit/examples/wayland/overview-compositor/main.qml?h=6.5&id=dd5f398ea2cd66dccba1582cd910e398e8f66029
This is supposed to fix the deprecation warning.