mirror of
https://github.com/qmlnet/qmlnet.git
synced 2026-05-16 14:15:57 -06:00
[GH-ISSUE #140] Can't get unmanaged hosting to work #85
Labels
No labels
bug
enhancement
help wanted
help wanted
pull-request
question
todo
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/qmlnet#85
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @geigertom on GitHub (Jun 11, 2019).
Original GitHub issue: https://github.com/qmlnet/qmlnet/issues/140
Hi, I'm trying to use Qml.Net in a project. I was able to run the examples, but I cannot get the unmanaged hosting approach to work. Unmanaged, because I need to make use of Qt's QVideoFilter and Camera features in order to do some image processing.
I can make the project build, but when I try to run it from Qt Creator I get the following output:
From what I understand, this is not a Qt/Qml.Net-specific error, but rather having to do with .net Interoperability, which I do not know much about at this point.
This is my main function from main.cpp:
And here's my Program.cs:
I was following the setup guide at https://qmlnet.github.io/setup/unmanaged-hosting/, only adjusting the git repo url to the current location. I tried in Ubuntu 18.04. and Windows7, both 64bit, dotnetcore2.2, same result. Any ideas?
Cheers,
Tom
@geigertom commented on GitHub (Jun 19, 2019):
I eventually found the sample projects (https://github.com/qmlnet/qmlnet/tree/develop/samples/hosting) and could finally make it work. Had to change 'QQmlApplicationEngine.RegisterType("test");' to 'Qml.Net.Qml.RegisterType("test", 1);' to make it run though.
I find it a little hard to get started with qml.net, as there is not a definite entry point for people who are new to the project. The instructions on https://qmlnet.github.io/setup/ are outdated and do not work (see original posting) and the samples still need tweaking to run without errors.
Anyway, I'm glad its working now, qml.net looks really promising, thank you for your time and effort!
Tom
@vadi2 commented on GitHub (Jun 19, 2019):
Yeah - the documentation is a bit out of date so it is indeed tough to get started. Would you mind submitting a PR for that particular example? Together we can make it easier :)
(I'm not the dev, just another community member)
@geigertom commented on GitHub (Jun 19, 2019):
I created a pull request containing the necessary adjustments.