ui->graphicsPipeView->setScene(PipeScene);
QRectF pipe_rect
(0,
0,
250,
250);
QRectF inner_rect
(10,
10,
230,
230);
PipeScene
->addEllipse
(pipe_rect,
QPen(QColor(0,
0,
0)),
QBrush(QColor(230,
230,
230)));
// this draws the circle in the picture
path->moveTo(0, 0);
path->lineTo(250, 250); // this draws the NW to SE line - I drew this as a sanity check because I couldn't get the arc to draw
path->moveTo(250, 0);
path->lineTo(0, 250); // this draws the NE to SW line - I also drew this as a sanity check because I couldn't get the arc to draw
path->arcMoveTo(inner_rect, 90);
path->lineTo(125, 125); // this draws the horizontal line, but according to the arcMoveTo command, it should be vertical (at least I think that's what it's supposed to be)
path->closeSubpath();
PipeScene->addPath(*path);
ui->graphicsPipeView->show();
PipeScene = new QGraphicsScene;
ui->graphicsPipeView->setScene(PipeScene);
QRectF pipe_rect(0, 0, 250, 250);
QRectF inner_rect(10, 10, 230, 230);
PipeScene->addEllipse(pipe_rect, QPen(QColor(0, 0, 0)), QBrush(QColor(230, 230, 230))); // this draws the circle in the picture
QPainterPath *path = new QPainterPath();
path->moveTo(0, 0);
path->lineTo(250, 250); // this draws the NW to SE line - I drew this as a sanity check because I couldn't get the arc to draw
path->moveTo(250, 0);
path->lineTo(0, 250); // this draws the NE to SW line - I also drew this as a sanity check because I couldn't get the arc to draw
path->arcMoveTo(inner_rect, 90);
path->lineTo(125, 125); // this draws the horizontal line, but according to the arcMoveTo command, it should be vertical (at least I think that's what it's supposed to be)
path->closeSubpath();
PipeScene->addPath(*path);
ui->graphicsPipeView->show();
To copy to clipboard, switch view to plain text mode
Bookmarks