I'm drawing an image (see below) and it works in principle. However, for some reason two of the commands don't make any difference as if they weren't seen by the compiler. Does anyone have any ideas why?
map.fill(Qt::white);
pen.setStyle(Qt::DashDotLine);//doesn't make a difference
pen.setWidth(3); //doesn't make a difference
p.drawLine(50,50,100,100);
map.save("file.jpg", 0, 90);
QPixmap map(100,100);
map.fill(Qt::white);
QPainter p(&map);
QPen pen;
pen.setStyle(Qt::DashDotLine);//doesn't make a difference
pen.setWidth(3); //doesn't make a difference
p.setPen(QColor(0,0,0));
p.drawLine(50,50,100,100);
map.save("file.jpg", 0, 90);
To copy to clipboard, switch view to plain text mode
Bookmarks