Sorry for the indeed too strong formulation - and thanks for the link to the 
very interesting “declarative widgets” project of KDAB!

Best wishes


> On 14 Nov 2022, at 12:19, Ulf Hermann via Interest <> 
> wrote:
>> I think that QML/JS is not viable for scripting of QtWidgets since
>> public functions are not available when registering Qt classes as
>> types (only slots and Q_INVOKABLE functions next to properties).
>> Without the public class functions only very basic functionality is
>> exposed to the scripting engine. For custom classes one has of course
>> control over what will be exposed but one can not change this for
>> existing QtWidget classes (except when changing source code).
> "Not viable" is a bit harsh. There are limits to this approach, but
> people have done it before. See for example
> . If you want to create the
> whole widgets UI declaratively in QML, you're probably going to hit some
> major road blocks. However, it doesn't sound like that was the plan
> here. If you just need some additional functions exposed to C++, you can
> create your own proxy types with additional Q_INVOKABLEs.
> best regards,
> Ulf
> _______________________________________________
> Interest mailing list

Interest mailing list

Reply via email to