slint-ui / slint

Slint is a declarative GUI toolkit to build native user interfaces for Rust, C++, or JavaScript apps.
https://slint.dev
Other
17.24k stars 581 forks source link

webview element #3930

Open ChrisCochrun opened 11 months ago

ChrisCochrun commented 11 months ago

I am wanting to port an app I'm building to slint. One of the requirements I have tho includes embedding html files which is possible in QT with QT's webengine. Is there some way to achieve this with slint?

If not, would it be possible to add a webengine element? I'd be up for trying to figure out how to add it if I'm pointed in the right direction.

bipboy commented 11 months ago

I'll second that question. Having the ability to embed HTML files would be pretty nifty. It would certainly open up more possibilities for Slint apps.

CantHackTheHack commented 7 months ago

I will 3rd this motion. Any options at this point?

tronical commented 7 months ago

I see two ways of how we can achieve this in the future:

  1. Embed an external web engine as window. This requires a windowing system and comes limitations such as the inability to easily place controls on top of the web view.
  2. For a Linux-only environment, an engine like wpe can provide dma buffers for rendered frames, which would be imported into the GL rendering. This is Linux specific, but would allow for perfect composition.

The two aren't mutually exclusive, of course.

Today, (2) is technically doable today, I think. User bartbm on our Mattermost has had success importing external textures into Slint here.

I think a reasonable acceptance criteria for this issue would be if https://github.com/slint-ui/slint/issues/4640 was implemented and we had at least an example in our docs how to use for example wry.