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

Forums

OverviewFelgo 2 Support (Qt 5) › How to run function when the page was becomes the active page?

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #20367

    Kacper

    I want to run function “factorial” when page has been becomes the active page. How I can do It?

    NavigationStack{
                    Page{
    
    
                        id: taskrow
                        title: "Listy"
                        SearchBar {
                             id: searchBarThreads
                             onAccepted: {
    
                             }
                          }
    
                        AppListView {
                                delegate: SimpleRow {
                                  onSelected: console.log("Clicked Item #"+index)
                                  width: parent.width/2
                                }
                                model: [
                                  {
                                    text: "Lista 1",
                                    detailText: "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
                                  },
    
                                  {
                                    text: "Lista 2",
                                    detailText: "Sed vel ipsum ac dui aliquam ornare.",
                                  },
    
                                  {
                                    text: "Lista 3",
                                    detailText: "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
                                  },
    
                                  {
                                    text: "Lista 4",
                                    detailText: "Sed vel ipsum ac dui aliquam ornare.",
                                  }
                                ]
                              }
                        function factorial() {
                                if(isCurrentStackPage==true);
                                else{
                                    taskrow.title = "false";
                                }
                            }
                    }
                }

     

    #20373

    Günther
    Felgo Team

    Hi,

    the page offers signals like Page::appeared or Page::pushed to add handler code at certain points of the Page lifecycle on the NavigationStack.

    Best,
    Günther

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