[Qt-interest] question regarding polygon and imagviewer
John Weeks
john at wavemetrics.com
Fri Oct 29 18:10:19 CEST 2010
On Oct 29, 2010, at 3:12 AM, Mahendra G.R wrote:
> QPointF mouseCord[10] = {QPointF(mousePosX,mousePosY)};
You're making an array of 10 QPointF's. The first element of the array
contains mousePosX,mousePosY; the rest would contain default-
constructed QPointF's. Then you draw it. You're getting only one
QPointF in your array, the latest mouse press.
You need to build the array (or a QPolygon) inside mousePressEvent().
Regards, John Weeks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20101029/e0b9e8b1/attachment.html
More information about the Qt-interest-old
mailing list