White-Oak / qml-rust

QML (Qt Quick) bindings for Rust language
MIT License
205 stars 18 forks source link

webview #9

Open pythoneer opened 7 years ago

pythoneer commented 7 years ago

hi, do you see any way to use the webview module? Unfortunately the webview needs an initialization by invoking QtWebView::initialize();

White-Oak commented 7 years ago

If this is all it needs, it probably won't be a problem.

Edit: won't be a problem to introduce a special function in qml-rust that would call to QtWebView::initialize();

pythoneer commented 7 years ago

That would be cool. But the original question embeds a more general problem. As one could add more and more wrappers manually to invoke certain c++ Qt features as they are requested by users – i wonder how do you see the overall problem with this crate that certain QML features depends on c++ side implementaions.

See my original problem was that i need QSyntaxHighlighter to proberly Higlight Text in my QML TextArea ... i can already do that with html rich text but that breaks QTextCursor::setPosition ... etc. but i foresaw i need an easier alternative and that is just using a webview and implement a TextArea myself.

But that is just solving my problem. How do you see that problem gets handled in the future? Just say: "this crate is called qml-rust not qt-rust this is focusing on qml" i am ok with that as i see myself no easy other way.