Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QAbstractItemModel comparison
Qt 6.11 is out! See what's new in the release blog

QAbstractItemModel comparison

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 739 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.
  • S Offline
    S Offline
    Suths
    wrote on last edited by
    #1

    Hi all,

    I have two models which i wan't to compare, such that given model A I can tell what elements are the same, modified or not present in model B (using comparison function implemented by each tree item). I'm unsure how to approach this problem and wondered if anyone had tackled a similar algorithm in the past. The best I could come up with was iterate over each item in A and check if it's in B, but this does not seem that neat and will probably have a O(n^2) complexity. On that note has anyone in the past implemented a breath first iterator in the past, is it easy?

    Apologies if this question is not appropriate for this forum.

    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