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.67k stars 611 forks source link

How to add backgroud using TextEdit #6709

Closed worldyuan closed 3 weeks ago

worldyuan commented 3 weeks ago

I want to set backgroud to transparent within TextEdit.

FloVanGH commented 3 weeks ago

Hi,

thank you for your question. At the moment that is not directly possible on TextEdit. What you can do instead is to use TextInput instead. For more details you can check the code of TextEdit it uses internal the TextInput https://github.com/slint-ui/slint/blob/master/internal/compiler/widgets/common/textedit-base.slint.

There is also a open issue to collect ideas and feedback on the topic how to support styling for the std-widget #5392.