[PyKDE] Qt4: QPainter.drawText
Patrick Stinson
patrickkidd.lists at gmail.com
Mon Apr 10 10:36:45 BST 2006
I'm trying to draw some text within a bounding rectange, and am
running into a problem with the polymorhpic nature of
QPainter.drawText.
I see:
void drawText(const QPointF &p, const QString &s);
void drawText(const QRectF &r, int flags, const QString &text,
QRectF *br /Out/ = 0);
void drawText(const QRect &r, int flags, const QString &text,
QRect *br /Out/ = 0);
void drawText(const QRectF &r, const QString &text, const
QTextOption &o = QTextOption());
but I get:
painter.drawText(rect, 0 | Qt.AlignCenter, self.text(), rect)
TypeError: too many arguments to QPainter.drawText(), 3 at most expected
I've always wondered how sip dealt with these potentially confusing situations.
--
Patrick Kidd Stinson
http://www.patrickkidd.com/
http://pkaudio.sourceforge.net/
http://pksampler.sourceforge.net/
More information about the PyQt
mailing list