Hacker News new | ask | show | jobs
by diskzero 2054 days ago
Can the native widgets be used instead of the Canvas widgets in the browser hosted view?

The definition of layout is nice, but handling state changes is still imperative. Is there a way to have values update without having to explicitly respond to signals?

1 comments

If you mean the native browser widget, this is currently not planed. The browser view is just a way to preview the result, but the real product is meant to be used natively without a browser.

On the desktop platform, we can make use of a native style (using the styles from Qt in the current implementation)

As for the handling of the state change, they are not imperative. The values update automatically as the property changes. (For example the text of this button changes when you click it: https://www.sixtyfps.io/editor/?snippet=%0Aimport+%7B+Button... )

Got it. Can you show an example of modifiying the button label outside of the button click? I am curious how you would modify values outside of the scope of the event handler.
In the following example, the text is bound to the text of a line edit: https://www.sixtyfps.io/editor/?snippet=import+%7B+LineEdit+...

Is that the kind of example you were looking for?

That is great. Thanks!