mirror of
https://github.com/qmlnet/qmlnet.git
synced 2026-05-16 14:15:57 -06:00
[GH-ISSUE #147] How to get access to raw textDocument? #91
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#91
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 (Jun 28, 2019).
Original GitHub issue: https://github.com/qmlnet/qmlnet/issues/147
Pretty specific question, but I need to implement syntax highlighting in my application which requires access to both the rich text and plain text contents of a TextField. The way to retrieve it is via textDocument() - but as discovered here (https://github.com/qmlnet/qmlnet/issues/138), not all QML methods are actually invokable, which is a roadblock.
I'd like to still stick with managed hosting for the time being. What's the way forward to make it work? Is it possible to add a custom binding to Qml.Net for this textDocument() function?
@pauldotknopf commented on GitHub (Jul 9, 2019):
Doing this would require bindings for
QQuickTextDocument,QTextDocument,QTextBlock,QTextCursor, etc.We do support interacting with QObjects now (with INetQObject), but some types don't derive from QObject (such as QTextCursor).
Considering this and the effort, I think it might be a better approach to create a native derived QML component that exposes the methods needed in a way that is friendly to the .NET interop layer.
@vadi2 commented on GitHub (Jul 9, 2019):
What do you mean by a native derived QML component?