Hello all.,
I got stuck somewhere in drawing a line with two colors.
Well i want to draw horizontal, vertical, slant lines with two colors one is above the other just like a sandwich.
eg.. "======================================" just like this. above line of different color and lower line of different color. but without any space in between both.
i have tried
gradient1.setColorAt(0.0, Qt::darkBlue);
gradient1.setColorAt(0.1, Qt::red);
painter.
setPen(QPen(QBrush(gradient1
), penWidth, Qt
::SolidLine, Qt
::RoundCap, Qt
::RoundJoin));
QLinearGradient gradient1;
gradient1.setColorAt(0.0, Qt::darkBlue);
gradient1.setColorAt(0.1, Qt::red);
painter.setPen(QPen(QBrush(gradient1), penWidth, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin));
To copy to clipboard, switch view to plain text mode
but nothing works for me. it just draw line of color red ...
Any idea how to make it possible?
Bookmarks