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. Issue with QHeaderView visual/logical indexes
Forum Updated to NodeBB v4.3 + New Features

Issue with QHeaderView visual/logical indexes

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 3.2k 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.
  • V Offline
    V Offline
    vicent
    wrote on last edited by
    #1

    A couple of weeks ago I read this "blog entry":http://blog.qt.digia.com/blog/2012/05/16/qt-commercial-support-weekly-20-visualizing-the-logical-2/ about QHeaderView and the meaning of visual and logical indexes. Because there is something in the post that I don't understand I posted a comment but I got no answer so I've decided to post here asking for help.

    The post presents the following QHeaderView sample:

    sect names A B C D E
    visualIndex 0 1 2 3 4
    logicalIndex 0 1 2 3 4

    then move some sections and get:

    sect names B C A D E
    visualIndex 0 1 2 3 4
    logicalIndex 1 2 0 3 4

    and then says that for the B section we have:

    • logicalIndex(0) -> 1
    • logicalIndexAt(0) -> 1
    • visualIndexAt(0) -> 1 (shouldn't it be 0, accordingly to the previous table?)

    So it seems that section B has two different visual indexes at the same time, 0 and 1. Maybe it is a typo (that one can find again in the last example of the blog) or maybe I'm misunderstanding the visualIndexAt() function.

    Could someone clarify things to me, please?

    Thanks in advance.

    1 Reply Last reply
    0
    • L Offline
      L Offline
      lgeyer
      wrote on last edited by
      #2

      To me, visualIndexAt(0) should indeed be 0.

      1 Reply Last reply
      0
      • V Offline
        V Offline
        vicent
        wrote on last edited by
        #3

        OK, thanks for your help.

        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