ChatCrawlersearch across public Telegram Open the app
Q

Qt for Python (PySide/Shiboken)

snapshot for August 2025
‹ August 2025 ›×
I
Hey everyone! I’m currently reading about QML type annotations for JavaScript functions. If I were using C++, parts of my QML code could be compiled into C++, and type annotations would help the compiler generate more efficient code. But with Python, QML isn’t compiled - so there’s no performance or efficiency benefit from type annotations here, right?
K
And isn't documented very well.
All good, type hints have other benefits as well: better maintainability and they are enforced. So it's still worth adding them 😄 I was just curious about this ..
I
Generally, I feel some of the C++ documentation does not transfer over well imo. E.g. separating C++ and QML vs Python and QML. It's advised to not do any performance critical things in QML but rather do it in C++. Because C++ is faster than QML. That's not true for Python and QML, at least in my own (very limited) testing, I found QML to be quite a lot faster.
S
But for visual guarantees, I am still puzzled what to do where. As QML in essence for its visual presentation was/is also limited by a single thread.
For me, I try to also take testability into account. I don't think there's a way of testing QML and importing objects from Python. At least, I am not aware of it. So I implement business logic in Python and try to mock it im QML tests. A use case would be testing a Python implementation of a model and the view + delegate in QML.
I
Another question: Is there a way to import resources (qrc file) when running QML tests? I always get a lot of warnings because it cannot resolve my resources 😅
A
Solved it. I've set the flags to Qt.WindowType.Dialog | Qt.WindowType.FramelessWindowHint and made the window modal.
A
Indeed, it is the default behavior. However, for me, it isn't the desired one. I'd like to display a kind of a splash screen all the time it's required. The current behavior allows a user to dismiss the screen at any time before my app is ready to go on. With the screen gone, I have no way to tell the user what is going on with the app. Again, I've found a way out. It might not be the perfect one, but still.
T
2025-08-19 17:41:12.503 3311-8456 AndroidRuntime org.main.main E FATAL EXCEPTION: qtMainLoopThread Process: org.main.main, PID: 3311 java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "_ZTVNSt6__ndk13pmr25monotonic_buffer_resourceE" referenced by "/data/app/~~0_E2vO5Y8C7HraXuRdeOTQ==/org.main.main-gDmPOTFbNCL4aUh-dAMkhg==/lib/arm64/libQt6Core_arm64-v8a.so"... at java.lang.Runtime.load0(Runtime.java:1032) at java.lang.System.load(System.java:1625) at org.qtproject.qt.android.QtLoader.loadLibraryHelper(QtLoader.java:497) at org.qtproject.qt.android.QtLoader.lambda$loadLibraries$1$org-qtproject-qt-android-QtLoader(QtLoader.java:570) at org.qtproject.qt.android.QtLoader$$ExternalSyntheticLambda1.run(Unknown Source:6) at org.qtproject.qt.android.QtThread.lambda$run$0(QtThread.java:57) at org.qtproject.qt.android.QtThread$$ExternalSyntheticLambda0.run(Unknown Source:4) at org.qtproject.qt.android.QtThread$1.run(QtThread.java:25) at java.lang.Thread.run(Thread.java:1042)
C
I use pyside6.8.3 ndk=r27c but this issue arises, what is the reason?
C
arojas: tag was pushed
Calendar: August 2025
MoTuWeThFrSaSu1234567891011121314151631761841942021222324252627328293031
Archive by month
Open in Telegram Каталог площадок Искать в ChatCrawler

A snapshot of an open public feed from the search index ChatCrawler — “Google for public Telegram”; refreshed as the venue is crawled. Times are UTC.

Public content only, official Telegram API. About · FAQ · What we do not do · Remove a page · Catalog