Forums

OverviewV-Play 2 Support (Qt 5) › System status bar not shown

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #14488

    Phil

    Hi,

     

    I am trying to show the system status bar using:

    onInitTheme:

    {

    Theme.colors.statusBarStyle = Theme.colors.statusBarStyleBlack

    }

     

    And it is not working even if the reported statusBarHeight = 20

    #14519

    Günther
    V-Play Team

    Hi Phil!

    For V-Play Apps, the status bar should be shown by default (statusBarStyleBlack), as described in our docs. The setting only applies to iOS and Android devices.
    I just tested it on both iOS and Android and everything seems to work fine, on which device do you have this issue?

    You can use the following code to test the status bar setting:

    import VPlayApps 1.0
    import QtQuick 2.5
    
    App {
    
      // initialize (not really necessary as statusBarStyleBlack is the default setting)
      onInitTheme: {
        Theme.colors.statusBarStyle = Theme.colors.statusBarStyleBlack
      }
    
      // debug output
      Component.onCompleted: {
        console.log("INITIAL STATUS BAR STYLE: "+Theme.statusBarStyle)
      }
    
      Connections {
        target: Theme
        onStatusBarStyleChanged: {
          console.log("STATUS BAR STYLE: "+Theme.statusBarStyle)
          console.log("STATUS BAR HEIGHT: "+Theme.statusBarHeight)
        }
      }
    
      // simple app with button to switch the statusBarStyle
      Navigation {
        NavigationItem {
          icon: IconType.home
          title: "Home"
    
          NavigationStack {
            Page {
              title: "Home"
    
              AppButton {
                text: "Show/Hide Statusbar"
                onClicked: {
                  if(Theme.statusBarStyle !== Theme.colors.statusBarStyleHidden)
                    Theme.colors.statusBarStyle = Theme.colors.statusBarStyleHidden
                  else
                    Theme.colors.statusBarStyle = Theme.colors.statusBarStyleBlack
                }
              }
    
            }
          } // stack
        } // nav item
      } // nav
    
    } // app
    

     

    Best,
    Günther

    #14877

    Phil

    Sorry for the late reply but I just tested your example and I still do not see the system statusbar on the iOS.  I will try to update the SDK.

    #14878

    Phil

    I just did update the SDK to version 5.7 on the MacOS and I still can’t see the system statusbar on my iPhone.  While on the console I see the style switching back and forth from 0 and 2, the height is always 0.

    #14880

    Günther
    V-Play Team

    I see, on which device do you have this issue?

    Best,
    Günther

    #14882

    Günther
    V-Play Team

    Hi,
    can you please also make sure that your Project-Info.plist file uses the following setting:

        <key>UIViewControllerBasedStatusBarAppearance</key>
        <false/>

    This is required to let the V-Play Application control the status bar appearance.

    Best,
    Günther

    #14887

    Phil

    Ok it works now, thanks a lot!

Viewing 7 posts - 1 through 7 (of 7 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support