Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

Forums

OverviewFelgo 3 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
    Felgo Team

    Hi Phil!

    For Felgo 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 Felgo 3.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
    Felgo Team

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

    Best,
    Günther

    #14882

    Günther
    Felgo 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 Felgo 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.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded