Forums

OverviewFelgo 2 Support (Qt 5) › How to resolve error for unknown navigationBarHidden property?

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #22118

    Abe Burks

    Despite of the documentation the property navigationBarHidden is unknown for a Page in a NavigationStack. How can resolve this issue to hide the navigation bar?

    #22139

    Alex
    Felgo Team

    Hi,

    can you post a code example that shows the issue?

    Cheers,
    Alex

    #22141

    Abe Burks

    @alex Sure. Thanks for your support:

    import Felgo 3.0
    import QtQuick 2.0
    import QtQuick.Controls 2.4
    
    App {
        NavigationStack {
            anchors.fill: parent
    
            Page {
                id: mainPage
                anchors.fill: parent
                navigationBarHidden: true
    
                SwipeView {
                    id: swipeView
                    anchors.fill: parent
                    interactive: true
                    ...
                    Item {
                        ...
                    }
                    Item {
                        ...
                    }
                    Item {
                        ...
                    }
                    ......
                }
            }
        }
    }

     

    #22147

    Abe Burks

    I identified a conflict between QtQuick.Controls and Felgo library. If I import both libraries Page QML Type of Felgo with the navigationBarHidden property is not used. The incompatibility of QtQuick.Controls with Felgo library is a critical issue for professional app development. I found a workaround by importing the Felgo library just in the main QML file file with functions. I noticed, that even QtQuick.Layouts is not part of the Felgo SDK.

    #22158

    Alex
    Felgo Team

    Hi,

    it looks like you run into a namespace conflict here, which is easily solved. The missing navigationBarHidden property comes from the fact that you import QtQuickControls AFTER Felgo, thus the Page type from the controls module overrides the Felgo module. So you have 2 options:

    • import Felgo after controls, to give the Felgo components priority
    • import Felgo or controls as own namespace, e.g. like that:
    import Felgo 3.0
    import QtQuick.Controls 2.4 as QQC
    
    App {
      // ...
    
      QQC.SwipeView {
    
      }
    }

    You can also use QtQuick.Layouts with Felgo, it is also included in the Live Client and can be used with live reloading.

    Cheers,
    Alex

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