QML Object Type is not a type error in QTCreator

后端 未结 4 1309
无人及你
无人及你 2021-02-20 10:01

Hi Everyone i am new to QT and i am having trouble loading one qml through another qml Basically i have created a qml MyTabView(MyTabView.qml)

 import QtQuick 2.         


        
4条回答
  •  野性不改
    2021-02-20 10:38

    Have you added the file to your Resources ?
    Adding your MyTabView.qml to your project in the same directory of main.qml is not sufficient.
    You have to put your QML file in the Resources (probably main.qrc/qml/) in order to have it deployed.
    The editor of Qt Creator does not need this inclusion in order to find your type, therefore it displays no error.

提交回复
热议问题