Skip to content

slint #509

Answered by vigilanz
vigilanz asked this question in Q&A
slint #509
Nov 18, 2024 · 2 comments · 7 replies
Discussion options

You must be logged in to vote

So I thanks @asny, I figured this out now and the three-d scene ends in a slint Image component on the screen. I write a shortened version down here in case someone else needs this later. Please add suggestions if something is bad or wrong in the code below. I assume a width/height of 100 throughout the example. I hope I did not make mistakes when shortening this, but you should get the idea.

// On the slint side
component MainWindow inherits Window {
    in property <image> texture <=> image.source; // so you can call .set_texture() with an image on the window instance

    image := Image {
        preferred-width: 100px;
        preferred-height: 100px;
        min-width: 100px;
       …

Replies: 2 comments 7 replies

Comment options

You must be logged in to vote
4 replies
@vigilanz
Comment options

@vigilanz
Comment options

@asny
Comment options

asny Nov 29, 2024
Maintainer

@vigilanz
Comment options

Comment options

You must be logged in to vote
3 replies
@asny
Comment options

asny Dec 13, 2024
Maintainer

@bryce-happel-walton
Comment options

@bryce-happel-walton
Comment options

Answer selected by asny
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants