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

Forums

OverviewFelgo 3 Support (Qt 5) › app.tablet not working in oncomplete on iOS Simulator

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

    Patrik Dusek

    Hi Team,

    seems like the app.tablet does not return the correct info if its used within the initialization of components.

    Whenever I use something like that:

        Component.onCompleted: {
    
            if (!app.tablet){
                navigation.addNavigationItem(iosMoreNav)
            }
    
        }
    

    its not recognized on ios (works fine within felgo live client and android).

    Is this a known behaviour? Is this related only to the ios Simulator (have currently no live tablet)

    Best,

    Patrik

     

    #24840

    Alex
    Felgo Team

    Hi Patrik,

    what model are you using in the simulator? Then we can try to reproduce and further investigate it.

    Best,
    Alex

    #24841

    Patrik Dusek

    Hi Alex,

    what do you mean with model?

    I use the simulators from xcode. (13.2.1) Same behaviour on all iPad configs.

    I asked the client for info if its the same on devices. I will let you know. I can’t send you a simple code part because the project is to complex. But I can give you access to the git hub project.

    Best,

    Patrik

    #24843

    Patrik Dusek

    Hi Alex,

    same behviour on live device 🙁

    Best,

    Patrik

    #24844

    Alex
    Felgo Team

    Hi Patrik,

    we can reproduce this. Please try this instead, to overcome the initialization timing for now:

    Component.onCompleted: {
        Qt.callLater(function() {
            if (!app.tablet){
                navigation.addNavigationItem(iosMoreNav)
            }
        })
    }

    Best,
    Alex

    #24845

    Patrik Dusek

    Hi Alex,

    works fine, thx 🙂

    I also need this here:

                NavigationStack {
                    initialPage: app.tablet?modulePageID:modulesPageSmartphoneID
                }
    

     

     

    Is there a way to set the initial page with a function?

    Thx,

    Patrik

    #24847

    Patrik Dusek

    Found a solution.

    thx,

    Patrik

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