You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm coming from the Book "Python and Qt - The Best Parts". I don't know if this is the right spot for this issue, but it is mainly about the book.
This book uses the examples in this repo. There's one example how to use QML with PyQt. Then later on fbs is being added to the stack. Now I wanted to combine both but fell on my nose doing so.
If you use QML like in the example and add fbs to it, the frozen app won't do anything. It starts a UI process but doesn't open a window. In that situation you have to kill that process, or you can't freeze the project again, because the .exe is still running in the background. By fiddling around I found what the problem is:
The frozen app has no copy of the .qml file. So, it can't load it. You need to move it into the src/main/resources/base folder and load it like so:
Freezing the project like this makes the frozen executable run as expected.
Yes, you can combine the information from the book to come to this solution. But I think it should be mentioned explicitly that you have to use .get_resource() for .qml files, too.
The text was updated successfully, but these errors were encountered:
I'm coming from the Book "Python and Qt - The Best Parts". I don't know if this is the right spot for this issue, but it is mainly about the book.
This book uses the examples in this repo. There's one example how to use QML with PyQt. Then later on fbs is being added to the stack. Now I wanted to combine both but fell on my nose doing so.
If you use QML like in the example and add fbs to it, the frozen app won't do anything. It starts a UI process but doesn't open a window. In that situation you have to kill that process, or you can't freeze the project again, because the
.exe
is still running in the background. By fiddling around I found what the problem is:The frozen app has no copy of the
.qml
file. So, it can't load it. You need to move it into thesrc/main/resources/base
folder and load it like so:Freezing the project like this makes the frozen executable run as expected.
Yes, you can combine the information from the book to come to this solution. But I think it should be mentioned explicitly that you have to use
.get_resource()
for.qml
files, too.The text was updated successfully, but these errors were encountered: