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. Add new column treemodel and customheaderview...

Add new column treemodel and customheaderview...

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 231 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.
  • NevezN Offline
    NevezN Offline
    Nevez
    wrote on last edited by Nevez
    #1

    2726c940-27b8-4f20-9ccc-c8603cc5fcbc-image.png
    e8034806-389d-436e-ab26-6d6fd3d3cd3d-image.png

    Hi ,
    I have a custom headerview which consists of Qheaderview.
    I also have a model where I apply a custom treemodel.
    When I drag the column headers from this headerview to the above area, the relevant column is hidden.
    I want something more after this.

    When I drop the column to the above field, I want a new column to be added to the 0th column index of the treemodel and also of the qheaderview.

    I am using the addcolumn() function for the TreeModel and adding a column.
    It doesn't seem to give the result I want in QheaderView.
    How should I manage these two classes synchronously?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      By default, QHeaderView gets its content from the model as well. Are you also creating and returning the adequate data from it ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1

      • Login

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