indeed you are absolutely right. i committed changes and compiled without any problem with QtCreator yesterday, so from now the shared-build version is available on svn.
Back to my problem, i considered what psih128 said, but unfortunately i can not see where the QGraphicsItems would be a problem.
Here is the code which determines my item's rect (full code here) :
void
{
qreal lod = option->levelOfDetail ;
double radius = 2.0/lod ;
m_rect.setRect( -radius, -radius, 2*radius, 2*radius ) ; // <- HERE
painter->save();
painter
->setRenderHint
(QPainter::Antialiasing);
_pen.setCosmetic(true) ;
// setColor on QPen ...
painter->setPen( _pen ) ;
painter->drawRect(m_rect) ;
painter->restore();
}
void
TSPVertexItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *)
{
qreal lod = option->levelOfDetail ;
double radius = 2.0/lod ;
m_rect.setRect( -radius, -radius, 2*radius, 2*radius ) ; // <- HERE
painter->save();
painter->setRenderHint(QPainter::Antialiasing);
QPen _pen ;
_pen.setCosmetic(true) ;
// setColor on QPen ...
painter->setPen( _pen ) ;
painter->drawRect(m_rect) ;
painter->restore();
}
To copy to clipboard, switch view to plain text mode
And here is my QGraphicsItem::shape() function
TSPVertexItem::shape() const
{
path.addRect( m_rect );
return path;
}
QPainterPath
TSPVertexItem::shape() const
{
QPainterPath path;
path.addRect( m_rect );
return path;
}
To copy to clipboard, switch view to plain text mode
This said, the artifact seems to be size-constant in scene coordinates (i.e : if i zoom in, artifact is bigger and vice-versa). I don't use to insist like this, but here and now I'm stuck; any comment/idea will be gracefully accepted
Bookmarks