zhuzichu520/PySide6-FluentUI-QML

求解决qrc:/qt/qml/FluentUI/Controls/FluWindow.qml:5:1: module "org.wangwenx190.FramelessHelper" is not installed 方案

Closed this issue · 5 comments

import QtQuick
import QtQuick.Window
import FluentUI

FluWindow {
width: 640
height: 480
visible: true
title: qsTr("Hello World")

}

23:54:42: Starting C:\Program Files\Python311\python.exe -u main.py...
[Hook] attach 9560, C:\Program Files\Python311\python.exe
[Hook] detach 9560, C:\Program Files\Python311\python.exe
[Hook] detach 9560, C:\Program Files\Python311\python.exe
[Hook] detach 9560, C:\Program Files\Python311\python.exe
QQmlApplicationEngine failed to load component
file:///C:/Users/w/Documents/untitled1/main.qml:5:1: Type FluWindow unavailable
qrc:/qt/qml/FluentUI/Controls/FluWindow.qml:5:1: module "org.wangwenx190.FramelessHelper" is not installed
[Hook] detach 9560, C:\Program Files\Python311\python.exe
[Hook] detach 9560, C:\Program Files\Python311\python.exe
23:54:42: C:\Program Files\Python311\python.exe 退出,退出代码: -1
{1 ?} {2?}

使用FluWindow前先初始化FluApp,代码详见

@zhuzichu520
image
QList(qrc:/qml/AppMainWindow.qml: No such file or directory)
为啥找不到文件?

要先将qrc文件用pyside6-rcc工具转换成py文件才能使用,然后在你的main.py中导入import resource.example_rc as rc

可以看下example中的

import resource.example_rc as rc

example中写了一个py脚本,可以执行一下就直接转换了

已解决!!!谢谢 @zhuzichu520