QTableWidget is most likely your best bet - it uses setHorizontalHeaderLabels() and setVerticalHeaderLabels() so you can control both axes.
from PyQt4 import QtGui class MyWindow(QtGui.QMainWindow): def __init__(self, parent): QtGui.QMainWindow.__init__(self, parent) table = QtGui.QTableWidget(3, 3, self)
Of course, if you want to completely control the content and formatting of the headers, you can use the .setHorizontalHeaderItem () and .setVerticalHeaderItem () methods to determine the QTableWidgetItem for each header ...
For more information, see the official documentation.
Rini source share