Error handling for component loading
This commit is contained in:
parent
1533ecbcf2
commit
0afaba02d0
1 changed files with 4 additions and 1 deletions
|
@ -47,7 +47,10 @@ Item {
|
|||
|
||||
function loadPage(filename, properties) {
|
||||
var component = Qt.createComponent(filename);
|
||||
console.log('error: ' + component.errorString());
|
||||
if (component.status != Component.Ready) {
|
||||
console.log('Error loading ' + filename + ':' +
|
||||
component.errorString());
|
||||
}
|
||||
if (properties === undefined) {
|
||||
component.createObject(pgst);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue