int main(int argc, char *argv[])
{
Form form;
scene.setSceneRect(0, 0, form.graphicsView->width(), form.graphicsView->height());
form.graphicsView->setScene(&scene);
form.graphicsView->fitInView(scene.sceneRect());
form.show();
return app.exec();
}
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
Form form;
QGraphicsScene scene;
scene.setSceneRect(0, 0, form.graphicsView->width(), form.graphicsView->height());
scene.addRect(0, 0, 10, 10, QPen(), QBrush(QColor(Qt::black)));
form.graphicsView->setScene(&scene);
form.graphicsView->fitInView(scene.sceneRect());
form.show();
return app.exec();
}
To copy to clipboard, switch view to plain text mode
Bookmarks