Planned maintenance has been done but it did not solve the problem. So work will continue on this and a new time for trying updates will be announced asap.
Qt for android app not displaying fullscreen
amins last edited by amins
Im trying to display an app in fullscreen mode on android device, problem is screen doesn't get fullscreen because of the navigation bar,
The white bar at the bottom is where the navigation buttons usually is, as you see i cant paint over it its constantly white.
I am using QT 5.9 and trying build something for android API 21, for the window i am using Mainwindow, and the function MainWindow.showFullScreen. How can i solve this?
Hi and welcome to devnet,
You should add which version of Qt you are using as well as Android version.
mvuori last edited by
If the area is white, it means that the window is indeed fullscreen (as the buttons are not visible), but painted only with white, which must be the background colour you have set, but not with your paintevent code. So which is it? Not fullscreen or not painted?
(There have been in old Qt versions bugs where the buttons remain visible in fullscreen mode, and also workarounds. If you use a very old Qt, check this: [https://bugreports.qt.io/browse/QTBUG-33135](link url) )
amins last edited by
The area is then not painted, i have tried to fill the hole screen with another color but it still leaves the bottom line white as you see in picture below.
The way i paint is by filling a rectangle with the size of Mainwindow.Width and MainWindow.Height. The "real" background i have set is supposed to be black which then can't cause the problem.
some some code please. Especially where you set the size of your main screen.
Also does it mean you use QML? Or QtWidgets?
amins last edited by
Picture one is how i get the size of the screen to use on my app
The first photo is of my main.c, while the other photo is where i paint it in mainwindow.cpp
so all you do is calling
Try the following (remove all the fullscreen code):
const QScreen* screen = qApp->primaryScreen(); w.setGeometry( QRect(QPoint(0,0), screen->geometry ().size() );
additionaly to what @raven-worx said, you can try setting this windowflag
this should paint the window over everything.