Results 1 to 7 of 7

Thread: QTableView replace row number with sign

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2010
    Location
    Poland
    Posts
    26
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default QTableView replace row number with sign

    I want to replace row number in QTableView with '>' char. How can I do this?

  2. #2
    Join Date
    Feb 2006
    Location
    Jarrell, Texas, USA
    Posts
    70
    Thanks
    7
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: QTableView replace row number with sign

    You need to set the values for the horizontal headers in an implementation of headerData() or setHeaderData() in your model.
    See QAbstractItemModel.

    Karl

  3. #3
    Join Date
    Oct 2010
    Location
    Poland
    Posts
    26
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QTableView replace row number with sign

    setHeaderData has roles and I don't see role which will make ">" in vertical header. Can you paste a code? Maybe I'm doing something wrong.

  4. #4
    Join Date
    Feb 2006
    Location
    Jarrell, Texas, USA
    Posts
    70
    Thanks
    7
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: QTableView replace row number with sign

    See if this qtcentre post helps: http://www.qtcentre.org/threads/4382...-in-QTableView

    Karl

Similar Threads

  1. Replies: 0
    Last Post: 7th October 2010, 06:38
  2. QTableView row number from mouse position
    By lukass in forum Newbie
    Replies: 1
    Last Post: 20th February 2010, 14:04
  3. Count the number of rows in a QTableView
    By grub87 in forum Qt Programming
    Replies: 9
    Last Post: 28th June 2009, 16:31
  4. QTableView has constant number of rows
    By tomeks in forum Qt Programming
    Replies: 5
    Last Post: 10th December 2008, 15:29
  5. QTableView number of rows and scrollbar issue
    By jnk5y in forum Qt Programming
    Replies: 3
    Last Post: 1st March 2006, 06:55

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.