Comments (3)
Slint struct and other types can currently only contains fields of type known to Slint.
I don't know if we can support this usecase.
It can be worked around by using an integer id, and have mapping between id and the actual type in Rust.
from slint.
Slint struct and other types can currently only contains fields of type known to Slint. I don't know if we can support this usecase. It can be worked around by using an integer id, and have mapping between id and the actual type in Rust.
True, it's possible to do this with an id; but if you want to do anything more complicated inside the for loop, like calling a common function that affects each child individually, I think you would need the ability to pass more complicated types of variables as parameters in the function, like Widget types. This would be a huge bonus. This is one huge advantage of Flutter. It is similar to issue #4891.
It would be interesting to know how difficult this would be. I think this is a bottle-neck for a lot of functionality.
from slint.
We would need to support importing rust struct.
I think this would be a duplicate of #1726
So it would allow to import Rust struct from Slint code
Closing this issue as duplicate of #1726
from slint.
Related Issues (20)
- Investigate using SlotMap HOT 3
- design mode: regression in moving widgets
- why my lineedit losses the focus HOT 3
- manual edits of line_edit break callbacks HOT 2
- Crash on Windows when risizing window HOT 3
- Live preview window is not closeable in vscodium (KDE) HOT 1
- [Bug] `TextEdit`/`LineEdit`: Hold right shift and press Left/Right arrow can't select text on Win10
- Skia: word-wrap and elide doesn't work HOT 1
- DatePicker and TimePicker improvements
- Add `step-size` to qt `SpinBox`
- Math Postfix expressions on numbers HOT 2
- Callbacks for invoke_from_event_loop() and Weak::upgrade_in_event_loop() should support return values HOT 3
- slint winit: unrecognized renderer skia, falling back to FemtoVG
- ESP32-S3 rendering issue HOT 10
- slint core error for compilation HOT 4
- import error in slint module HOT 1
- Program takes a very long time to start (Linux, Wayland, Hyprland) HOT 15
- UI hanging on Windows when multiple components are created HOT 4
- Windows11x64 use vulkan failed HOT 2
- Add a new ToDo MVC example HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from slint.