Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Sometimes page animation is not running when currentIndex is changed on a SwipeView
Forum Updated to NodeBB v4.3 + New Features

Sometimes page animation is not running when currentIndex is changed on a SwipeView

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
swipeviewcurrentindexanimation
1 Posts 1 Posters 386 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.
  • J Offline
    J Offline
    jeanmilost
    wrote on 27 Nov 2020, 00:36 last edited by
    #1

    In one of my projects, I'm currently facing a strange bug which I cannot figure out. This bug happens in a complex interface, and I could not reproduce it in a simpler project, so forgive me, I cannot publish any code to illustrate the issue.

    So my problem is the following: In a qml file, I have a SwipeView, which contains several pages, each of them contain a ListView and several other components (Buttons, TextInput, ComboBox, ...) One of these page shows a kind of file browser, an when you double-click on a dir, the view is cleared and repopulated with the sub-dir content, in a such manner it's possible to browse in the dirs content.

    However, every time I clear and repopulate the view of this browser, the page animation is broken in the parent SwipeView, in a such manner as when I change the currentIndex property, the value effectively changes, but the SwipeView remains on the same page, and the animation never runs.

    I tried to search the reason of a such bug for several days now, but I cannot understand why it happens. All I know is:

    1. The bug seems appear after the following code is executed in my browser model Clear() function:
        beginResetModel();
        m_Rows.clear();
        endResetModel();
    
    1. The SwipeView currentIndex property no longer runs the page change animation until I interfere with something on the UI (e.g clicking a button, moving manually the page a little, ...). If I do that the currentIndex property works again... until the browser view is cleared again.

    I have sincerely no idea about what may cause a such bug. Has someone already faced a such bug? What was the solution if yes? And by the hell, what may cause a such bug? May is a memory corruption? Or what else...

    NOTE I may eventually publish the demo I created to try to reproduce the issue, if it may help, however, as I said, this demo doesn't present the issue, so I thought that it wouldn't be useful.

    1 Reply Last reply
    0

    1/1

    27 Nov 2020, 00:36

    • Login

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