How to set window position? #3560
-
I found API to do this from Rust, but in Slint language Window doesn't have |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
It is not possible to set the Window position directly in .slint The rationale is that the Slint code should mainly be there for doing the design of the UI, and setting the position is not something a designer would design, it is more part of the logic. A common use case i've seen for setting the position of a Window is to implement drag and move of the window. IMHO that is a valid use case and we should address it by having drag handle as tracked in #613 |
Beta Was this translation helpful? Give feedback.
It is not possible to set the Window position directly in .slint
You need to use the native API for that.
The rationale is that the Slint code should mainly be there for doing the design of the UI, and setting the position is not something a designer would design, it is more part of the logic.
A common use case i've seen for setting the position of a Window is to implement drag and move of the window. IMHO that is a valid use case and we should address it by having drag handle as tracked in #613