[Interest] Qt 6.5.2 and qmllint questions/issues
Matthew Fincham
matthewf at cat.co.za
Wed Aug 30 21:02:32 CEST 2023
Hi Ulf
Thank you for the response. This setup generates a qmllint warning, even
in a skeleton QtCreator project. A bug report has been created:
https://bugreports.qt.io/browse/QTBUG-116623
Kind regards
Matthew
On 2023/08/30 15:58, Ulf Hermann via Interest wrote:
> You can expose the type as both a value type and a namespace:
>
> struct TestGadget
> {
> Q_GADGET
> QML_NAMED_ELEMENT(testGadget)
> Q_PROPERTY(int value MEMBER value)
>
> public:
> enum class GadgetEnum
> {
> OptionA,
> OptionB,
> OptionC,
> };
> Q_ENUM(GadgetEnum)
> };
>
> struct TestGadgetDerived : TestGadget
> {
> Q_GADGET
> };
>
> namespace TestGadgetEnums {
> Q_NAMESPACE
> QML_FOREIGN_NAMESPACE(TestGadgetDerived)
> QML_NAMED_ELEMENT(TestGadget)
> }
>
> The derived type is not strictly necessary, but if you expose the
> exact same type twice, tooling may currently get confused in certain
> situations. We will fix that soon-ish.
>
> There is unfortunately a lot of outdated information about the QML
> type system all over the internet.
>
> best regards,
> Ulf Hermann
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> https://lists.qt-project.org/listinfo/interest
More information about the Interest
mailing list