standalone example: serve client page over loopback HTTP server


Currently, standalone code opens index.html page directly from the build
directory, hardcoding build directory path in the application. This
works fine for host platforms, but doesn't work for cross-compiled
platforms.

Instead of manually copying the client page files via cmake, add
index.html and qwebchannel.js to resources and serve them from a minimal
loopback HTTP server. Open the browser at the target loopback URL,
instead of opening the client page as a file:// URL under the build
directory.

Since the BUILD_DIR variable was used only to reference the client page
files inside the build directory, we no longer need it.

Pick-to: 6.12
Task-number: QTBUG-148470
Change-Id: I204f09368292d527735905fb4b173f5013577d24
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
commitf86438dae52f921438e8b9c9523b05892b93ae5b
parenta93db95aee4f8911091ae438ca8e215e4e373117
authorAleksander Wawrzyniak <aleksander.wawrzyniak@qt.io>
committerAleksander Wawrzyniak <aleksander.wawrzyniak@qt.io>
commit timeTue, 11 Aug 2026 07:41:46 +0000