
Originally Posted by
jacek
Maybe something like this?
pen.setStyle( Qt::DashDotLine );
pen.setStyle( Qt::DashDotLine );
To copy to clipboard, switch view to plain text mode
Thanks, I had tried that but spaces too small so I tried this,
QPen pen
(Qt
::blue,
0, Qt
::DashLine);
painter.setPen(pen);
for( n = 0; n < paintLines.count(); ++n )
{
QPainter painter( this );
QPen pen(Qt::blue, 0, Qt::DashLine);
painter.setPen(pen);
for( n = 0; n < paintLines.count(); ++n )
{
To copy to clipboard, switch view to plain text mode
I want a thin line "0" and the length of the spaces. that a line width of 3 would give me. Now I am aware that QPen doc. has
QVector<qreal> dashes;
qreal space = 4;
dashes << 1 << space << 3 << space << 9 << space
<< 27 << space << 9;
pen.setDashPattern(dashes);
QPen pen;
QVector<qreal> dashes;
qreal space = 4;
dashes << 1 << space << 3 << space << 9 << space
<< 27 << space << 9;
pen.setDashPattern(dashes);
To copy to clipboard, switch view to plain text mode
, but the demo doesn't go into this and in addition we have anothrer widget "QVector" and "qreal" instead of "single" or "double". I assume this will display the same line regardless of screen resolution?.Will Let you know how i make out
thanks,
pete
Bookmarks