[Qt-interest] Changing the shape of a QGraphicItems

Sujan Dasmahapatra sdh at lmglasfiber.com
Mon Jun 8 11:07:01 CEST 2009


Dear Friends

I think some of u know I am into the development of an aerospace
software using Qt.I am into the last feature development for my 1st
version.

I have a QGraphicsItem which is a polyline having  an int nPoints, and
QPointF points.Now I am developing a gui where I'll select the geometry
from the screen and then post the UI.In th UI user will change the
geometry which will be done from some other code through QProcess.

                Now after running the code at a button press I'll get
the new int nPoints and new QPointF points which I am setting with old
data.

I am trying to do something like this.

 

 

Geometry *geometry = new Geometry; //Geometry is derived from
QGraphicsItem which  is displayed on the screen

geometry->npoints = newNumberOfPoints;

for(int i=0;i<newNumberOfPoints;i++)

{

                Points[i].setX(newx[i]);

Points[i].setY(newy[i]);

}

geometry->update();

 

But with this I am not able to see the new geometry.what could be the
problem can anybody help me plss  ??

 

 

Kind regards, 
LM Glasfiber R&D (India) Pvt. Ltd.
 
Sujan Dasmahapatra
Project Engineer - CFD
  
Telephone: +91 80 66470248 
Mobile:+91 9900839788 
E-mail: sdh at lmglasfiber.com <mailto:sdh at lmglasfiber.com>  

 

 

 

 

--------------------------------------------------------------

This e-mail and any attachments are confidential. If you are not the
named or intended recipient, please notify the sender immediately and do
not disclose the contents to any other person, use it for any purpose or
store or copy the information in any medium. Any unauthorized
disclosure, use or storage is prohibited and might be unlawful.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090608/ecf2ff08/attachment.html 


More information about the Qt-interest-old mailing list