Details
-
Bug
-
Resolution: Invalid
-
P3: Somewhat important
-
None
-
6.7.2
-
None
Description
I'm creating RPG game by Qt and QML.
When I create a command window by QML engine, an error occurs.
Error message is like this.
The odd thing is that this code had no problem yesterday. I felt so good and went to bed because I could connect QAbstractListModel with QML. (That is to say, I didn't add any code.)When I boot up QtCreator today again, this error suddenly occurs... This is the reason I wonder that this is a kind of bug.
As you can see, the above two functions (setContextProperty) have no error.
Why does this error occur?
In the case of other reason, sorry for that.
I'm using QQuickWidget as CommandWindow. And then, I added the widget to a QGraphicsScene.
---------------------------------Edit-------------------------------------------↓
This file is the code of YouTube Qt Community.
This code has no problem.
This code uses qml_registerType and seems not to make an instance of QAbstractListModel.
I transplanted this code into my code, but it doesn't work well.
For example, the above code uses list property in model.
But in my case, this is unknown property...
QML code doesn't read model well, my command window became white.
For that reason, I changed my code to the way of pointer type with setContextProperty.
At first, I tried to transplant toDoList code into my codes, and then, I changed my code to the present code.
Yesterday, my app might have worked without problems by these two steps for some reasons.