qrc:/main.qml:18 SButton is not a type
来源:互联网 发布:腾讯软件管理下载 编辑:程序博客网 时间:2024/05/21 10:41
QML编程,定义一个组件后,使用它时报错 qrc:/main.qml:18 SButton is not a type
通过QTCreator添加QML File
添加完毕后,工程结构如下:
运行时报错:
Starting E:\project\qt\build-ScheduledTask-Desktop_Qt_5_8_0_MinGW_32bit-Debug\debug\ScheduledTask.exe...
QML debugging is enabled. Only use this in a safe environment.
QQmlApplicationEngine failed to load component
qrc:/main.qml:18 SButton is not a type
解决办法:
添加该QML文件到统一前缀下
当然,别的原因也可能导致该问题,如不在同一目录
0 0
- qrc:/main.qml:18 SButton is not a type
- return type of 'main' is not `int'
- editor does not contain a main type
- editor does not contain a main type
- selection does not contain a main type
- editor does not contain a main type
- selection does not contain a main type
- editor does not contain a main type
- selection dose not contain a main type
- selection does not contain a main type
- editor dose not contain a main type
- selection does not contain a main type
- Editor does not contain a main type
- selection does not contain a main type错误
- selection does not contain a main type的解决方案!
- Editor does not contain a main type 问题解决
- "editor does not contain a main type" 错误解决方法
- editor does not contain a main type的解决方案
- pycharm注册码
- Python——列表中存放字典遇到的问题
- oj125. Valid Palindrome
- java发送http请求模板示例
- html状态码
- qrc:/main.qml:18 SButton is not a type
- Mac 与 virtualbox windows7 共享文件
- warning: the gets function is dangerous and should not be used.
- Linux——Vi/Vim如何消除搜索后的关键字高亮
- 类 静态方法,属性,类方法
- vs编译时出现大量ws2def.h的错误的解决方法
- error C1189: #error : Please use the /MD switch for _AFXDLL builds---解决方案
- SQl行列互转
- 简单实现支持用户名和邮箱登录