Hi,

I encountered this error message:

QQmlComponent: Component is not ready
file:///C:/Qt/Qt5.4.0/5.4/mingw491_32/qml/QtQuick/Controls/StackView.qml:836: TypeError: Cannot read property 'Stack' of null


I can't find any similar issues around.

And the error message is too vague, is there any way to configure Qt Creator to display a specific error?

Any advise what could possibly the cause of this error. Below is my code on StackView.

Qt Code:
  1. StackView {
  2. id: mainStack
  3.  
  4. function effectivePop(clear) {
  5. var prevItem = mainStack.find(function(item, index) {
  6. return ( (item.transitory === undefined || !item.transitory) &&
  7. (item !== mainStack.currentItem) ); } );
  8. if ( (clear === undefined || clear) && prevItem.clear)
  9. {
  10. prevItem.clear();
  11. }
  12. mainStack.pop(prevItem);
  13. }
  14.  
  15. anchors.fill: parent
  16.  
  17. visible: false
  18.  
  19. delegate: StackViewDelegate {
  20. pushTransition: StackViewTransition {
  21. PropertyAnimation { target: enterItem; property: "opacity"; from: 0; to: 1; duration: 100 }
  22. PropertyAnimation { target: exitItem; property: "opacity"; from: 1; to: 0; duration: 100 }
  23. }
  24. }
  25.  
  26. Component.onCompleted: {
  27. push(Qt.resolvedUrl("ConnectionPage.qml"));
  28. push(Qt.resolvedUrl("Question.qml"));
  29. }
  30. }
To copy to clipboard, switch view to plain text mode 

If i'll add an initialItem, there's no error however, it won't display the actual page.

Please advise, thanks.