QGraphicsViewにテキストを追加しようとしています:
Widget::Widget(QWidget *parent) :
QWidget(parent),
ui(new Ui::Widget)
{
ui->setupUi(this);
QGraphicsScene scene;
scene.addText("Hello, world!");
ui->graphicsView->setScene(&scene);
}
ただし、プロジェクトの実行中は、QGraphicsViewには何も表示されません。