1
votes

I have a slot in my application backend which requires a QImage or QPixmap.

Now I want to call it from my QML frontend by providing a png from the resource file:

sessionManager.createUser("user", "qrc:///src/sessionManager/qml/Assets/user.png")

But if I set a breakpoint in createUser I can see that the passed image is null.

How is the correct way to do this?

1

1 Answers

0
votes

I don't know of a way to do this from QML. The correct way to do it would be change your C++ API/create a new one to accept a path to the image and load it there instead.