Results 1 to 2 of 2

Thread: QTable Horizontal Header Off

  1. #1
    Join Date
    Feb 2006
    Location
    Raleigh, NC
    Posts
    16
    Thanks
    2
    Qt products
    Qt3
    Platforms
    Windows

    Default QTable Horizontal Header Off

    My table's horizontal header is not lined up accurately with the cell. I can't quite figure out what is causing this. Here's a sample code fragment:

    Qt Code:
    1. class CommonDrugs(QTable):
    2. def __init__(self, parent, db):
    3. QTable.__init__(self, 4, 0, parent)
    4. self.setMinimumHeight(102)
    5. self.setMaximumHeight(102)
    6. self.numCols = 0
    7. self.startOCEANS = None
    8. self.startIHCIS = None
    9.  
    10. self.vheader = self.verticalHeader()
    11. self.vheader.setMinimumWidth(50)
    12. self.vheader.setLabel(0, QString('Cond A'))
    13. self.vheader.setLabel(1, QString('Cond B'))
    14. self.vheader.setLabel(2, QString('Cond C'))
    15. self.vheader.setLabel(3, QString('Cond D'))
    16.  
    17. hheader = self.horizontalHeader()
    18.  
    19. self.connect(hheader, SIGNAL("clicked(int)")
    20. , self.sortWholeRows
    21. )
    To copy to clipboard, switch view to plain text mode 

    I've tried using:
    self.hheader.setOffset(50)
    but to no avail.

    Any idea?
    Attached Images Attached Images

  2. #2
    Join Date
    Feb 2006
    Location
    Raleigh, NC
    Posts
    16
    Thanks
    2
    Qt products
    Qt3
    Platforms
    Windows

    Default Re: QTable Horizontal Header Off

    Bump. No takers?

Similar Threads

  1. How to edit Horizontal Header Item in QTableWidget
    By ioannis in forum Qt Programming
    Replies: 6
    Last Post: 5th March 2013, 18:50
  2. 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
  3. How to customize horizontal header (diagonal header view)
    By vairamuthu.g in forum Qt Programming
    Replies: 4
    Last Post: 4th September 2008, 15:59
  4. horizontal header over two rows in tablewidget
    By Nippler in forum Qt Programming
    Replies: 2
    Last Post: 28th April 2008, 10:33
  5. Replies: 1
    Last Post: 23rd August 2006, 18:02

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.