
Originally Posted by
szisziszilvi
The black sinus dots a bit below works fine, but these are just dots, not a smooth line.
And what do you expect to obtain with the pathGraphItem::paint() code you provided ? A blue line ? blue dots ?
Can you show the paint method used to paint the "black sinus dots" ?
If you want a blue line I'd say you can get rid of this :
painter->setBrush(Qt::blue);
painter->setBrush(Qt::blue);
To copy to clipboard, switch view to plain text mode
and replace it by
_pen.setWidthF(0) ;
_pen.setStyle(Qt::DotLine) ;
painter->setPen(_pen);
painter->setBrush(Qt::NoBrush);
QPen _pen(Qt::blue) ;
_pen.setWidthF(0) ;
_pen.setStyle(Qt::DotLine) ;
painter->setPen(_pen);
painter->setBrush(Qt::NoBrush);
To copy to clipboard, switch view to plain text mode
Also, concerning the "hole in the middle", this is maybe what you are looking for :
path.moveTo( firstPos ) ; // you may have forgotten this step by the way
path.quadTo( posBeforeHole) ;
path.moveTo( posAfterHole ) ;
path.quadTo( lastPos ) ;
QPainterPath path ;
path.moveTo( firstPos ) ; // you may have forgotten this step by the way
path.quadTo( posBeforeHole) ;
path.moveTo( posAfterHole ) ;
path.quadTo( lastPos ) ;
To copy to clipboard, switch view to plain text mode
Bookmarks