QML WebSocket サーバー
QMLのWebSocketServer の使用方法を示す簡単な例です。

この例では、ウィンドウを開き、着信接続を待機するWebSocketServer と、WebSocketServer に接続するWebSocketを用意しています。 ウィンドウがクリックされるたびに、WebSocketはWebSocketServer へメッセージを送信します。WebSocketServer には、受信したメッセージをウィンドウにログ出力し、再びメッセージを返すシグナルハンドラがあり、WebSocketには、返されたメッセージをウィンドウにログ出力するシグナルハンドラがあります。
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.