このページについて

Qt WebView 例 - WebViewの最小限の例Qt Quick

この例では、Qt XMLのWebView モジュールをQt Quick と組み合わせて使用する方法について説明します。

Android端末上でQtのウェブサイトを表示するWebビュー

Minibrowserは、Qt Quick ControlsとQt XMLのWebView を使用して、基本的なブラウジング体験を提供します。URL用のアドレスバーに加え、閲覧履歴を移動するためのいくつかのコントロールを備えています。

注: QtWebView モジュールを使用する場合、 QGuiApplication インスタンスを作成する直前にQtWebView::initialize()を呼び出す必要があります。QtWebView::initialize()を呼び出すことで、必要な事前設定手順が確実に実行されます。

    QtWebView::initialize();
    QGuiApplication app(argc, argv);

例の動作

以下の手順でサンプルを実行できます:

code.qt.io上のサンプルプロジェクト

© 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.