Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Sometimes Stack Pop is not working properly.
Forum Updated to NodeBB v4.3 + New Features

Sometimes Stack Pop is not working properly.

Scheduled Pinned Locked Moved Solved Mobile and Embedded
10 Posts 3 Posters 1.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    trupti007
    wrote on last edited by
    #1

    So when i click on back button i need to go to the previous page. To do that i have used stack.pop()
    but it's not working properly. One page intersecting the other.

    1 Reply Last reply
    0
    • T trupti007

      @sierdzio no there aren't any such property. can you suggest me something else in place of stack pop?

      J.HilkJ Offline
      J.HilkJ Offline
      J.Hilk
      Moderators
      wrote on last edited by
      #6

      @trupti007 you should also check your depth property when you call pop, to check if you have actually more items on the stack than you expect.


      Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


      Q: What's that?
      A: It's blue light.
      Q: What does it do?
      A: It turns blue.

      T 1 Reply Last reply
      2
      • sierdzioS Offline
        sierdzioS Offline
        sierdzio
        Moderators
        wrote on last edited by
        #2

        Hm I thought old items are always visible only in SwipeView, but maybe they are so as well in StackView. Documentation does not seem to mention it.

        Can you share some code of how you operate your Stack?

        (Z(:^

        T 1 Reply Last reply
        0
        • sierdzioS sierdzio

          Hm I thought old items are always visible only in SwipeView, but maybe they are so as well in StackView. Documentation does not seem to mention it.

          Can you share some code of how you operate your Stack?

          T Offline
          T Offline
          trupti007
          wrote on last edited by
          #3

          @sierdzio
          on my page page i have defined the stack view
          StackView{
          id: stackView
          focus: true
          anchors.fill: parent
          clip: true
          }
          And this is how i have used stackView.pop(). On some pages it is working fine but some pages it is just not.
          Keys.onBackPressed: {
          stackView.pop();
          }

          sierdzioS 1 Reply Last reply
          0
          • T trupti007

            @sierdzio
            on my page page i have defined the stack view
            StackView{
            id: stackView
            focus: true
            anchors.fill: parent
            clip: true
            }
            And this is how i have used stackView.pop(). On some pages it is working fine but some pages it is just not.
            Keys.onBackPressed: {
            stackView.pop();
            }

            sierdzioS Offline
            sierdzioS Offline
            sierdzio
            Moderators
            wrote on last edited by
            #4

            @trupti007 said in Sometimes Stack Pop is not working properly.:

            On some pages it is working fine but some pages it is just not

            Then analyze the code differences between those pages. If it only fails for some cases, you are likely to find a bug in your code. Maybe an element has it's visible property forced to true somewhere?

            (Z(:^

            T 1 Reply Last reply
            0
            • sierdzioS sierdzio

              @trupti007 said in Sometimes Stack Pop is not working properly.:

              On some pages it is working fine but some pages it is just not

              Then analyze the code differences between those pages. If it only fails for some cases, you are likely to find a bug in your code. Maybe an element has it's visible property forced to true somewhere?

              T Offline
              T Offline
              trupti007
              wrote on last edited by
              #5

              @sierdzio no there aren't any such property. can you suggest me something else in place of stack pop?

              J.HilkJ 1 Reply Last reply
              0
              • T trupti007

                @sierdzio no there aren't any such property. can you suggest me something else in place of stack pop?

                J.HilkJ Offline
                J.HilkJ Offline
                J.Hilk
                Moderators
                wrote on last edited by
                #6

                @trupti007 you should also check your depth property when you call pop, to check if you have actually more items on the stack than you expect.


                Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


                Q: What's that?
                A: It's blue light.
                Q: What does it do?
                A: It turns blue.

                T 1 Reply Last reply
                2
                • J.HilkJ J.Hilk

                  @trupti007 you should also check your depth property when you call pop, to check if you have actually more items on the stack than you expect.

                  T Offline
                  T Offline
                  trupti007
                  wrote on last edited by
                  #7

                  @J-Hilk can you give me an example ?

                  J.HilkJ 1 Reply Last reply
                  0
                  • T trupti007

                    @J-Hilk can you give me an example ?

                    J.HilkJ Offline
                    J.HilkJ Offline
                    J.Hilk
                    Moderators
                    wrote on last edited by
                    #8

                    @trupti007

                    StackView{
                    id: sView
                    
                    function popOne(){
                         console.log("stackdepth",sView.depth)
                         sView.pop()
                    }
                    
                    }
                    

                    Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


                    Q: What's that?
                    A: It's blue light.
                    Q: What does it do?
                    A: It turns blue.

                    T 2 Replies Last reply
                    0
                    • J.HilkJ J.Hilk

                      @trupti007

                      StackView{
                      id: sView
                      
                      function popOne(){
                           console.log("stackdepth",sView.depth)
                           sView.pop()
                      }
                      
                      }
                      
                      T Offline
                      T Offline
                      trupti007
                      wrote on last edited by
                      #9

                      @J-Hilk cool i will try it. thanks

                      1 Reply Last reply
                      0
                      • J.HilkJ J.Hilk

                        @trupti007

                        StackView{
                        id: sView
                        
                        function popOne(){
                             console.log("stackdepth",sView.depth)
                             sView.pop()
                        }
                        
                        }
                        
                        T Offline
                        T Offline
                        trupti007
                        wrote on last edited by
                        #10
                        This post is deleted!
                        1 Reply Last reply
                        0

                        • Login

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • Users
                        • Groups
                        • Search
                        • Get Qt Extensions
                        • Unsolved