Answer the question
In order to leave comments, you need to log in
How to stretch an application to full screen on Android?
I am writing an application on QT 5.9 in kiosk mode. It should work expanded to the entire display. Expand to full screen:
QGuiApplication app(argc, argv);
QQmlApplicationEngine engine;
const QUrl url(QStringLiteral("qrc:/interface/main.qml"));
QObject::connect(&engine, &QQmlApplicationEngine::objectCreated,
&app, [url](QObject *obj, const QUrl &objUrl) {
if (!obj && url == objUrl)
QCoreApplication::exit(-1);
}, Qt::QueuedConnection);
engine.load(url);
#if defined(Q_OS_ANDROID)
QQuickWindow *window = qobject_cast<QQuickWindow *>(engine.rootObjects().first());
window->showFullScreen();
#endif
DisplayManager( 2083): getDisplayInfo: displayId=0, info=DisplayInfo{"Embedded Display", uniqueId "local:0", app 600 x 976, real 600 x 1024, largest app 1024 x 951, smallest app 600 x 527, 69.6 fps, supportedRefreshRates [69.6], rotation 3, density 160 (159.5681 x 160.42105) dpi, layerStack 0, appVsyncOff 0, presDeadline 15367816, type BUILT_IN, state ON, FLAG_SECURE, FLAG_SUPPORTS_PROTECTED_BUFFERS}
Answer the question
In order to leave comments, you need to log in
Examination of the screen of the device under a microscope and counting the interface elements in pixels showed the non-squareness of the pixel on the screen.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question