Results 1 to 4 of 4

Thread: How to set header in Table View?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,346
    Qt products
    Qt5
    Platforms
    Windows
    Thanks
    318
    Thanked 872 Times in 859 Posts

    Default Re: How to set header in Table View?

    You probably need to implement the EditRole role for headerData(). You are returning an empty QVariant for everything except DataRole, which is probably telling the header that the cell is not editable.

    I don't see anything that corresponds to the flags() method that applies to the header, and QHeaderView does not seem to have anything either to indicate an editable state.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

  2. The following user says thank you to d_stranz for this useful post:

    SoleyRan (31st July 2019)

Similar Threads

  1. Replies: 1
    Last Post: 31st March 2016, 11:51
  2. adding image to header column of a table view
    By nageshvk in forum Qt Programming
    Replies: 1
    Last Post: 4th May 2011, 05:14
  3. Replies: 5
    Last Post: 3rd April 2010, 05:07
  4. How to set two rows in a table view Horizontal header?
    By sivollu in forum Qt Programming
    Replies: 11
    Last Post: 29th April 2009, 05:57
  5. How to customize horizontal header (diagonal header view)
    By vairamuthu.g in forum Qt Programming
    Replies: 4
    Last Post: 4th September 2008, 16:59

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.