Skip to content
QtWS25 Call for Papers
  • 0 Votes
    7 Posts
    3k Views
    SecantS

    @kshegunov @mrjj

    Thanks for your explanation. Finally I figured out that the problem lay in the signal QGraphicsScene::changed I used. I learned about this signal in an OpenGL example in Qt. By using it I was trying to update my wave soon after its last update, however this signal could also be triggered by changing axis range or window resize, which would probably cause the crash for I didn't consider thread safety and synchronization under this condition.

    So I defined a custom signal function and now the problem is solved.

  • 0 Votes
    116 Posts
    35k Views
    VRoninV

    Of course I'll cast my -1 vote as well.

    I'll add to point 1:

    If the data contained in the model is all of basic types or implicitly shared types then it's possible to already use the current framework without ever triggering any expensive* copy

    , to point 2:

    There's no clarity on how to support different types in different roles would we need an additional template argument for each used role beyond Qt::UserRole? is so the problems above grow exponentially with the roles

    And to point 3:

    No possible implementation for a reliable dataChanged emission if model internals are exposed directly

    *expensive = a copy that implies more that a:

    memcpy of less than 65bits and an increase/decrease of a numeric reference counter