Skip to content

How to access callback from imported slint file in rust? #2915

Answered by ogoffart
kkettinger asked this question in General
Discussion options

You must be logged in to vote

You can re-export it from the App.slint.

import { Backend } from "Backend.slint";
import { Button } from "std-widgets.slint";

// ADD THIS LINE
export { Backend }

export component App inherits Window {
    Button {
        clicked => {
            Backend.clicked(1);
        }
    }
}

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@kkettinger
Comment options

Answer selected by kkettinger
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants