I want to draw a shape on Qlabel but I can not draw anything in below code
.How can I do it
Qt Code:
{ Qt::MiterJoin)); painter.drawPie(80, 80, 400, 240, 60 * 16, 270 * 16); }To copy to clipboard, switch view to plain text mode
I want to draw a shape on Qlabel but I can not draw anything in below code
.How can I do it
Qt Code:
{ Qt::MiterJoin)); painter.drawPie(80, 80, 400, 240, 60 * 16, 270 * 16); }To copy to clipboard, switch view to plain text mode
Last edited by jpn; 4th August 2008 at 08:25. Reason: missing [code] tags
Please see the Image Viewer example in Qt Demos.
I don't want to draw image , for example I want to draw line or point or circle on Qlabel
Then see the Scribble example in Qt Demo (under Widgets section0![]()
![]()
Hi,
The first parameter of QPen object should be QBrush and in your code it seems to QColor
so replace Qt::Black by some thing such as QBrush(Qt::Black,Qt::SolidPattern)
i hope it works..painter.setPen(QPen(Qt::black, 15, Qt::SolidLine, Qt::RoundCap, Qt::MiterJoin));![]()
Bookmarks