| 1 |
/* |
| 2 |
* SPDX-FileCopyrightText: 2023~2023 CSSlayer <[email protected]> |
| 3 |
* |
| 4 |
* SPDX-License-Identifier: LGPL-2.1-or-later |
| 5 |
* |
| 6 |
*/ |
| 7 |
#include <QGuiApplication> |
| 8 |
#include <iostream> |
| 9 |
#include <private/qguiapplication_p.h> |
| 10 |
#include <qpa/qplatforminputcontext.h> |
| 11 |
#include <qpa/qplatforminputcontextfactory_p.h> |
| 12 |
#include <qpa/qplatformintegration.h> |
| 13 |
|
| 14 |
int main(int argc, char *argv[]) { |
| 15 |
QGuiApplication app(argc, argv); |
| 16 |
std::cout << "QT_QPA_PLATFORM=" << app.platformName().toStdString() |
| 17 |
<< std::endl; |
| 18 |
std::cout << "QT_IM_MODULE=" |
| 19 |
<< QPlatformInputContextFactory::requested().toStdString() |
| 20 |
<< std::endl; |
| 21 |
auto inputContext = |
| 22 |
QGuiApplicationPrivate::platformIntegration()->inputContext(); |
| 23 |
std::cout << "IM_MODULE_CLASSNAME="; |
| 24 |
if (inputContext) { |
| 25 |
std::cout << inputContext->metaObject()->className(); |
| 26 |
} |
| 27 |
std::cout << std::endl; |
| 28 |
return 0; |
| 29 |
} |