Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
qtws26_logo

The Qt Event of the Year: Qt World Summit 2026

Save Your Spot >
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. StackView transition only working once
Qt 6.12 LTS is out! See what's new in the release blog

StackView transition only working once

Scheduled Pinned Locked Moved Solved QML and Qt Quick
2 Posts 1 Posters 761 Views
  • 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.
  • I Offline
    I Offline
    igor_stravinsky
    wrote on last edited by
    #1

    I've got a stackView that I'm pushing three items onto.

    The stackview has a standard fade transition:

    popEnter: Transition {
                NumberAnimation { property: "opacity"; to: 1.0; duration: 5000 }
            }
            popExit: Transition {
                NumberAnimation { property: "opacity"; to: 0.0; duration: 5000 }
            }
    

    When I pop items off the stack, I'm only seeing the transition when I'm popping the last item off the stack (back to the stack's initialItem). The other screens appear immediately, but they seem to be disabled for the 5000 ms that the fade should happen during. Since the new screens aren't sliding in (the default behavior), I think the transition is happening, but for some reason isn't seen...

    Any ideas?

    1 Reply Last reply
    0
    • I Offline
      I Offline
      igor_stravinsky
      wrote on last edited by
      #2

      Ah, I think I found the bug...

      If I load my pages in an array, then the transitions don't fire.

      theStack.push([firstPage,{immediate:true}, secondPage, {immediate:true},thirdPage, {immediate:true}])
      

      If I load my pages one by one, the transitions work

      theStack.push(firstPage,{immediate:true})
              theStack.push(secondPage, {immediate:true})
              theStack.push(thirdPage,{immediate:true})
      

      This seems like a Qt error....

      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
      • Unsolved