Forums

OverviewFelgo 2 Support (Qt 5) › navigationBar and tabBar transparent backgroundColor

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #17602

    Marek

    Hi,

    I’m using NavigationStack to organize the pages. I would like to have common backgrouond (an image) for page and the navigationBar or tabBar. That’s mean to put an image as a background and make tabBar and navigationBar backgroundColor transparent. However when I do that (set transparent for navigationBar and tabBar) image below is not visible and navigationBar and tabBar has black background. Below is snippet of code from my app. How can I achieve that and is this possible ?

     

    Best Regards

    Marek

    App {
    
        licenseKey: "my_key";
    
        onInitTheme: {
            Theme.tabBar.backgroundColor="transparent"
            Theme.navigationBar.backgroundColor="transparent";
        }
        id: main_app
    
        Image {
            anchors.fill: parent
            source: Qt.resolvedUrl("qrc:/images/background.jpg");
        }
    
        NavigationStack {
            id: cfgNaviStack
            visible: true
    
            Cfg2Page {
                id: cfg2Page
            }
            Cfg3Page {
                id: cfg3Page
                visible: false
            }
            Cfg4Page {
                id: cfg4Page
                visible: false
            }
        }
    }

     

     

     

    #17607

    Günther
    Felgo Team

    Hi Marek!

    The background color settings only changes the color, but does not make the navigation bar translucent. The actual pages do not cover the full area below the NavigationBar by default. They are shown below the navigation bar, which is why you see a black background.

    You can set a translucent navigation bar for your pages with the Page::navigationBarTranslucency setting.

    Best,
    Günther from Felgo

    #17609

    Marek

     

    excellent, thank you.

Viewing 3 posts - 1 through 3 (of 3 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