The following simple program works perfectly on Linux: it renders a single
window, with a short, thick dashed line running from the top-left corner
towards the center.
On a Mac, it renders the window, but without the line. Why?
Both Linux and Mac version run on top of Qt 4.4.1 and PyQt 4.4.2. The full
source:
#!/usr/bin/env python
from PyQt4.QtGui import *
from PyQt4.QtCore import *
app = QApplication([])
widget = QWidget()
def paintEvent(event):
p = QPainter(widget)
p.setPen(QPen(Qt.black, 3, Qt.DashLine))
p.drawLine(1, 1, 30, 30)
widget.paintEvent = paintEvent
widget.show()
app.exec_()
_______________________________________________
PyQt mailing list [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt