PyInstaller and QML Files
问题 How can I include the QML file into my Python project as a single executable. When I run pyinstaller --onefile main.py , running the executable results in an error that the QML file is not found. Unless I use an absolute path or place view.qml in the same directory as my executable. I don't want to have a separate QML file, I want it combined into the executable. main.py: if __name__ == "__main__": app = QGuiApplication(sys.argv) engine = QQmlApplicationEngine() engine.load(QUrl("view.qml"))