Improving/extending QML type system

From Qt Wiki
Revision as of 14:54, 1 December 2023 by EdwardWelbourne (talk | contribs) (wikified mark-up)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


Session Summary

Session Owners

Notes

  • optionals are actually sum types of void and SomeType
  • actual sum types? QVariant converters are evil because
  • extend QMetaType to specify sum types and underlying types
    • possibly expressed as std::variant
  • allow that as types in QML to allow restrictions on what can be assigned to a property
  • Something similar with function types
    • possibly expressed as std::function
    • QMetaMethod?
    • member functions!
  • Interface types? We have sort of half interfaces in QML already. Let's not invent another one.

In QML: optional/sum unwrapping implicit or explicit?

  • z ?? "red"
  • z as color
  • There will be lots of corner cases.

Fabian will do some prototyping and post on mailing list.