Results 1 to 4 of 4

Thread: QTableView header in corner

  1. #1

    Default QTableView header in corner

    Hi ,

    I'm trying to find a way to insert a header item in the top left corner of a QTableView with both vertical and horizontal headers.
    Is there a way to do that ?

    I'm using Qt4.1.1 on windows.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QTableView header in corner

    Looks like the only way is to subclass QTableView and put the additional header widget in the corner yourself. Alternatively you might try just to insert it into the tableview layout, without subclassing. Anyway both of these approaches require reading the class source code.

  3. #3

    Default Re: QTableView header in corner

    Thanks I will try that .

    Is there a way to ensure the same color and border look as the header ?
    Maybe I could put a push botton of the right size and look there.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QTableView header in corner

    The header view uses regular palette colour roles, so you can use them to achieve the same look.

Similar Threads

  1. QTableWidget NW corner header item?
    By McKee in forum Qt Programming
    Replies: 9
    Last Post: 30th May 2012, 23:44
  2. QTableView currentChanged <> selecting header
    By Everall in forum Qt Programming
    Replies: 4
    Last Post: 1st April 2009, 08:24
  3. How to set QTableView width to width of horizontal header?
    By martinb0820 in forum Qt Programming
    Replies: 0
    Last Post: 2nd December 2008, 20:51
  4. QTableView with fixed header
    By aLiEnHeAd in forum Qt Programming
    Replies: 1
    Last Post: 25th November 2008, 08:14
  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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.