Problem with fullscreen mode in android with Qt 5.3.1
-
I am developing an android app (API 19) with qml (Qt 5.3.1, Mac OS X 10.8.5). The fullscreen mode works, but there is a little problem. The navigation bar is hidden, but the app is not using this space .
!http://i.stack.imgur.com/2UXBK.jpg(Screenshot)!main.cpp
@
...
QApplication app(argc, argv);
QQuickView viewer1(QUrl(QStringLiteral("qrc:///main.qml")));
viewer1.setResizeMode(QQuickView::SizeRootObjectToView); // no effect
viewer1.showFullScreen();
return app.exec();
...
@main.qml
@
import QtQuick 2.2Rectangle {
color: "red"
width: 100
height: 100
}
@I tried adding android:theme="@android:style/Theme.NoTitleBar.Fullscreen" to AndroidManifest.xml, but no solution.
Tested with simulator and device. Any ideas?
-
seems to be a problem with QML only, I use fullscreen on Android with C++/Qt and no problems. Please report the bug:
-
ok, i tried a qwidget solution, but the space is still there (only change: now it's black)
@
QApplication a(argc, argv);
MainWindow w;
w.showFullScreen();
w.centralWidget()->showFullScreen();
return a.exec();
@Did i missed something?
PS: Everything works fine with Qt 5.2.1.
-
That is a bug in Qt 5.3.1. It works fine in 5.3.0, too.
Qt 5.3.2 is in final testing phase, maybe it will no suffer from this.
-
I tested the snapshot 5.3.2 105 for Mac (19-Aug-2014 09:58) but the bug is still there. I discovered that the problem is much bigger...
If i rotate my smartphone, the screen sizes will not be updated and the app will unusable.
An alternative code doesn't help:
@QQmlApplicationEngine engine;
engine.load(QUrl(QStringLiteral("qrc:///main.qml")));
QQuickWindow *window = qobject_cast<QQuickWindow *>(engine.rootObjects().first());
window->showFullScreen();@ -
Happy end!
Current snapshot 5.3.2 for Mac (28-Aug-2014 01:47) resolves the problem.
http://download.qt-project.org/snapshots/qt/5.3/5.3.2/2014-08-28_108/
-
That is really great news, thanks for telling us!
-
Great!! thanks @milesteam.
-
@milesteam I tried to add it to my main.cpp file but its not working.