このページでは

QAndroidActivityResultReceiver Class

Androidのメインアクティビティにおいて、onActivityResult()からのコールバックに使用されるインターフェース。詳細...

ヘッダー: #include <QtCore/private/qandroidextras_p.h>
CMake: find_package(Qt6 REQUIRED COMPONENTS CorePrivate)
target_link_libraries(mytarget PRIVATE Qt6::CorePrivate)
qmake: QT += core-private
以下のように: Qt 6.2
ステータス: テクノロジープレビュー

このクラスはテクノロジープレビュー段階にあり、変更される可能性があります。

パブリック関数

virtual void handleActivityResult(int receiverRequestCode, int resultCode, const QJniObject &data) = 0

詳細な説明

QtAndroidPrivate::startActivity() およびQtAndroidPrivate::startIntentSender() API を使用する際に結果の通知を受け取るには、このクラスのサブクラスを作成してください。

メンバー関数のドキュメント

[pure virtual] void QAndroidActivityResultReceiver::handleActivityResult(int receiverRequestCode, int resultCode, const QJniObject &data)

QtAndroidPrivate::startActivity() またはQtAndroidPrivate::startIntentSender() を使用してアクティビティを起動した後、アクティビティの結果を取得するために、この関数を再実装してください。receiverRequestCode は、このレシーバーに固有のリクエストコードであり、もともと startActivity() または startIntentSender() 関数に渡されたものです。resultCode はアクティビティから返される結果であり、data はnullか、android.content.IntentクラスのJavaオブジェクトのいずれかです。最後の2つの引数は、onActivityResult()に渡される引数と同一です。

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