mirror of
https://github.com/qmlnet/qmlnet.git
synced 2026-05-16 14:15:57 -06:00
[GH-ISSUE #138] How to invoke C++ method? #86
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#86
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 @vadi2 on GitHub (May 24, 2019).
Original GitHub issue: https://github.com/qmlnet/qmlnet/issues/138
I see that it's possible to invoke a C++ method from the readme, but I can't get it working. My example:
It just bombs out with:
I've verified that I am indeed passing in a
QQuickTextDocumentclass which has aQTextDocument * textDocument() constmethod.@vadi2 commented on GitHub (May 28, 2019):
I've tried a whole lot of things involving
InvokeMethodbut nothing is working.@iWeaverMan commented on GitHub (May 29, 2019):
Method textDocument() is not invokable
https://stackoverflow.com/questions/24642370/qmetaobjectinvokemethod-no-such-method-when-using-inheritance/24642620
@vadi2 commented on GitHub (May 29, 2019):
Oh. So Qml.Net can't actually invoke any method? What can I do then - do I have to provide some C++ glue myself?
@pauldotknopf commented on GitHub (Jun 10, 2019):
You'd have to provide C++ glue yourself.
You can only invoke things that are known to the Qt meta system.
@pauldotknopf commented on GitHub (Jul 9, 2019):
Update, you can interact with
QObject`` types now usingINetQObject```.