[PyQt] Change background color of section in QHeaderView

2012-01-31 Thread Kamp, Peter van der (IMARES)
Hello, I have a QTableView with headers. The headers need a different background-color , depending if the items are set to editable. This can be toggled for the entire column by clicking the header. If the items are editable, the header must have a green background, otherwise red. I try to impl

[PyQt] issue with QPainter.drawPolyline and list of QPoints

2012-01-31 Thread Hans-Peter Jansen
Hi Phil, shouldn't this work: from PyQt4 import QtCore, QtGui app = QtGui.QApplication([]) pixmap = QtGui.QPixmap(16, 16) painter = QtGui.QPainter(pixmap) plist = [QtCore.QPoint(0, 15), QtCore.QPoint(0, 0), QtCore.QPoint(15, 0)] painter.drawPolyline(plist) With PyQt 4.9, this results in: TypeEr

Re: [PyQt] Parent/Child widget clipping

2012-01-31 Thread JPolk
So after tinkering with this a bit more, I'm in another conundrum, lol... When I replace the 'child-table' (QTableWidget) with another kind of widget, and give a size using 'setGeometry'...the solution no longer works... Why is that? What am I doing wrong, Pete? #---