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. Model update not shown after pop of StackView
Forum Updated to NodeBB v4.3 + New Features

Model update not shown after pop of StackView

Scheduled Pinned Locked Moved QML and Qt Quick
1 Posts 1 Posters 504 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.
  • clogwogC Offline
    clogwogC Offline
    clogwog
    wrote on last edited by
    #1

    I have a QML view with a StackView in it.

    when i initially load a ListView with a model of my own C++ model (subclassed from QAbstractListModel)
    it loads fine and shows everything.

    when i push another view in the StackView with a 'settings' QML that can clear the model, the model emits a dataChanged, but when i pop back to the ListView the changed (now empty) model is not updated in the View.

    Only if i go back (pop) one more in the StackView and re-load the ListView it is properly reflected by showing an empty ListView

    Is this expected behaviour of the StackView to not update the view on pop ?
    Do i need to force a refresh (besides emitting the dataChanged signal ) ?

    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