16 April 2022
Ссылка
click to show
click to show
hm, I'm trying to switch to PySide for qutebrowser again now that I have configurable import wrappers, and see a lot of stumbling blocks... https://github.com/qutebrowser/qutebrowser/issues/3625#issuecomment-1100623372
Cristián 🥑text not yet in the index
Additionally, if you work with QML, the tool will search
for QML types and generate the .qmltypes file in case you want
to include qmllint into your workflow
This is from the email you sent out about the release. With Qt 5.15, C++ Qt added QML_ELEMENT, to simplify registration of classes with QML. It also was done to make it possible for static analysis tools to generate code completion models for QML without the need for the qmltypes file.
Python added @QML_ELEMENT with PySide6. Is it not possible to use that same construct for code completion with Python modules?
I guess the fact that it's not a compiled language, and classes can be altered at any time dynamically causes issues with that.
@Keithel can you give an example of your question? I didn't get the idea of using a similar QmlElement for python modules
Cristián 🥑@Keithel can you give an example of your question? I didn't get the idea of using a similar QmlElement for python modules
Lol I'm not sure I can. I'll see if I can find the docs/blog post talking about how QML_ELEMENT can eliminate the need for the qmltypes type information files.
Cristián 🥑@Keithel can you give an example of your question? I didn't get the idea of using a similar QmlElement for python modules
Ссылка
click to show
click to show
https://www.qt.io/blog/qml-type-registration-in-qt-5.15
From Ulf Hermann. An excerpt that relates to what I'm talking about:
Furthermore, as you register your types procedurally, any QML tooling cannot automatically tell which types are available in which import. Qt Creator indeed has some heuristics that try to detect common registration patterns in C++ code, but this is necessarily incomplete. Figuring out whether a specific registration will be executed by the program is equivalent to solving the halting problem. Simpler tools like qmllint or qmlformat have no information about the C++ code and need to analyze your QML code in isolation. Therefore, they won't have any information about types registered from C++. In order to (partially) solve this problem the "qmltypes" files were introduced.
@Numerlor , I'm not following the conversation here (maybe it's not all being mirrored to TG?) What's happening?
Replymessage unavailable
Sure. The R&D folks might grumble, but you can tag me and when I get some time I can translate it to C++.
In most cases it's easy to translate.
@numerlor Do search the bug database to see if anyone's reported it already first though.