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. headerData

headerData

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 3 Posters 768 Views 2 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.
  • Q Offline
    Q Offline
    Qt Enthusiast
    wrote on last edited by
    #1

    viewerTreeModel::headerData(int section, Qt::Orientation orientation,
    int role

    In in above tree model I have 13 columns but it leading headerData is not called for all columns

    in my case the headerData is skipped fro column 9 and 12 , is there any way I can guide header data to be called fro headerData for all columns

    1 Reply Last reply
    0
    • Q Offline
      Q Offline
      Qt Enthusiast
      wrote on last edited by
      #2

      Qt Enthusiast about a minute ago
      viewerTreeModel::headerData(int section, Qt::Orientation orientation,
      int role

      In in above tree model I have 13 columns but it leading headerData is not called for all columns

      in my case the headerData is skipped fro column 9 and 12 , is there any way I can guide header data to be called fro headerData for all columns
      I have called hide columns in between

      JonBJ kshegunovK 2 Replies Last reply
      0
      • Q Qt Enthusiast

        Qt Enthusiast about a minute ago
        viewerTreeModel::headerData(int section, Qt::Orientation orientation,
        int role

        In in above tree model I have 13 columns but it leading headerData is not called for all columns

        in my case the headerData is skipped fro column 9 and 12 , is there any way I can guide header data to be called fro headerData for all columns
        I have called hide columns in between

        JonBJ Offline
        JonBJ Offline
        JonB
        wrote on last edited by
        #3

        @Qt-Enthusiast
        Hi. Just before answering your question, a word for you about your posts.

        A couple of times I have noticed you post like this, where you make post, and then when you want to alter its content you make a brand new second post. Are you aware that after you have made a post there is a vertical ... button at the lower-right of your posts (to the right of the reply quote ^0v)? You can left-click on that and pick Edit. That allows you to edit your own posts to change it. You do not need to make a new post or delete the original one. That's much clearer for you and anyone else trying to answer! :)

        Now to your question. It is your code which calls QAbstractItemModel::setHeaderData() for each column, so it's up to you what columns you do or do not call it on, so I'm not sure just what you are asking about. The fact that you have hidden some columns is not relevant, and the column number (section) that you pass is still range 0 to 12.

        1 Reply Last reply
        3
        • Q Qt Enthusiast

          Qt Enthusiast about a minute ago
          viewerTreeModel::headerData(int section, Qt::Orientation orientation,
          int role

          In in above tree model I have 13 columns but it leading headerData is not called for all columns

          in my case the headerData is skipped fro column 9 and 12 , is there any way I can guide header data to be called fro headerData for all columns
          I have called hide columns in between

          kshegunovK Offline
          kshegunovK Offline
          kshegunov
          Moderators
          wrote on last edited by
          #4

          @Qt-Enthusiast said in headerData:

          in my case the headerData is skipped fro column 9 and 12 , is there any way I can guide header data to be called fro headerData for all columns
          I have called hide columns in between

          No, because there's no fathomable reason to query the model for the header data if there's no need to display anything.

          Read and abide by the Qt Code of Conduct

          1 Reply Last reply
          3

          • Login

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