Results 1 to 2 of 2

Thread: disable header selection in QTableView

  1. #1
    Join Date
    Nov 2007
    Posts
    24
    Thanks
    5
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default disable header selection in QTableView

    Hi, With a QTableView / QStandardItemModel I use:

    qv->setSelectionBehavior(QAbstractItemView::SelectRow s);
    qv->setSelectionMode(QAbstractItemView::SingleSelecti on);

    Sounds good, but when I'm selecting a row on the grid, each cells of the horizontal header are selected too (pushed button like)

    Do you know how to prevent this ?

    Thanks...

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: disable header selection in QTableView


Similar Threads

  1. Replies: 2
    Last Post: 26th November 2009, 04:45
  2. QTableView header invisible
    By smacchia in forum Qt Programming
    Replies: 7
    Last Post: 20th November 2009, 03:21
  3. QTableView header dragging
    By cmaxb in forum Qt Programming
    Replies: 1
    Last Post: 9th December 2006, 12:11
  4. QTableView header in corner
    By danstr in forum Qt Programming
    Replies: 3
    Last Post: 18th May 2006, 20:16
  5. QTableView: disable row header
    By mattie in forum Qt Programming
    Replies: 6
    Last Post: 8th March 2006, 12:16

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.