⚠️ Forum Maintenance: Feb 6th, 8am - 14pm (UTC+2)
How change background OUTSIDE application window in Android?
I create aplication for Android using QMainWindow. All works fine but if I run application on device with screen resolution greater than window has - outside this window clean white field appears. I did not find the way how change this color. Later I will make scaling window but now I need make this field black. Anybody knows how change color OUTSIDE application window?
Or just better - how make it transparent? On my Android tablet I use Calculator++. It can appear as small window in upper left screen corner. Not as applet but as window exactly. Other descktop part remains visible and responsible for taps. Can I get similar behaviuor in application based on QMainWindow?
@Gourmet Why is your app not full-screen?
Cause I do not need full screen. On large tablet it looks ugly.
@Gourmet Non-fullscreen apps are actually unusual on mobiles and tablets (cannot remember any). I don't know how to change the background, I guess it is handled by the OS.
Gourmet last edited by Gourmet
I know some Android apps with "windows" smaller than screen size. They work fine and they confirm - this can be done. I'm sure not the OS but application defines how it is visible on Android screen.
Adding of android:theme="@android:style/Theme.Translucent" to <activity...> tag in AdroidManifest.xml makes entire screen black. Including background of application "window". This looks much better than entire white screen. I can fill "window" background by any needed picture. Outside it screen will remain black. But I expected get transparent background outside "window" - I wanna see other application activity there. How can I do that?
By the way - this theme setting forces standrard controls on screen look "Androidish". For example progress bar appeared like default Android progress bar - grey strip on yellow background and without border. In QtDesigner I tuned it's look differently but all my settings were lost. Buttons look different too. I afraid if I will set skins for buttons - they will be lost with theme setting. How can I force controls look as I requested but use theme for just app background? In other words - How can I force controls skinning appear AFTER Android theme applied?
tataeress last edited by
anyone cen help me with this same issue pls?
tataeress last edited by
found it finally :D
u need to add add this
to <application...> section of AndroidManifest.xml.
then add this to your class:
source : https://bugreports.qt.io/browse/QTBUG-57394
thx @Gourmet a lot