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

Forums

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

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

    Abe

    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

    @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

    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.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded