Quantcast
Channel: Qt DevNet forums: Qt Quick 1283365070**
Viewing all articles
Browse latest Browse all 4972

How to reload QML file with ApplicationWindow object?

$
0
0
Ok, I read docs and found this page [doc.qt.digia.com]. But when I try to use example code from article I received error like this: QQmlComponent: Created graphical object was not placed in the graphics scene. The code which I use looks like:     MdlManager {         id: logManager           signal reload(string logFile);           objectName: "logManager"         //mdlFilePath: ""         onMdlLogParserDidFinished: {               console.debug("File '"+parser.logFilePath+"' was parsed");               var component = Qt.createComponent("CentralWidget.qml");             var obj = component.createObject(mainWindow, {"width":mainWindow.width, "height":mainWindow.height});             if (obj === null)             {                 console.log("Error creating object");             }         }     } What I do wrong? P.S. I known what I read a docs for Qt 4.7 and QML 1.x, but I can’t find any docs for Qt 5 and QML 2.x in official docs. If somebody know where I can found any information about my problem please tell me. Thanks.

Viewing all articles
Browse latest Browse all 4972

Trending Articles