[Qt-interest] Changin the pen width for QGLWidget

Sujan Dasmahapatra sujan.dasmahapatra at gmail.com
Fri Dec 4 07:05:46 CET 2009


Dear Friends
I am trying to change the width of the pen which is currently used by the
paintEngine() in QGLWidget. For a particular object being drawn I want to
increase the width.But it gives error see below.
////////////////////////////////////////////////
paintEngine()->painter()->pen().setWidth(8);
paintEngine()->painter()->pen().setColor(trolltechPurple);
//errors
rc/graphicsview_mesh.cpp:852: error: passing `const QPen' as `this' argument
of `void QPen::setWidth(int)' discards qualifiers
src/graphicsview_mesh.cpp:853: error: passing `const QPen' as `this'
argument of `void QPen::setColor(const QColor&)' discards qualifiers
Please someone tell what am I doing wrong.
I want to increase the width and color for a particular object and after
drawing that object I want the width and color to be normal.

How can I achieve this. Any help would be appreciated.

-- 
Thanks & Regards
S. Dasmahapatra
B.E. (Aeronautics-Aerodynamics)
Software programmer
Bangalore, India
Ph:91-9900839788
Office:91-80-66470248
mail id : sujan.dasmahapatra at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091204/ed4b988d/attachment.html 


More information about the Qt-interest-old mailing list