diff options
Diffstat (limited to 'demos/declarative/minehunt/main.cpp')
-rw-r--r-- | demos/declarative/minehunt/main.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/demos/declarative/minehunt/main.cpp b/demos/declarative/minehunt/main.cpp index 8ca37ff..0b862e3 100644 --- a/demos/declarative/minehunt/main.cpp +++ b/demos/declarative/minehunt/main.cpp @@ -167,10 +167,7 @@ MyWidget::MyWidget(int width, int height, QWidget *parent, Qt::WindowFlags flags canvas->setFixedSize(width, height); vbox->addWidget(canvas); - QFile file(fileName); - file.open(QFile::ReadOnly); - QString qml = file.readAll(); - canvas->setQml(qml, fileName); + canvas->setSource(QUrl::fromLocalFile(fileName)); QmlContext *ctxt = canvas->rootContext(); ctxt->addDefaultObject(this); |