ChatCrawlersearch across public Telegram Open the app
Q

Qt for Python (PySide/Shiboken)

snapshot for July 2025
‹ July 2025 ›×
21 July 2025
Got it to compile now.
Still having trouble with mapping the MapLibre stuff onto this project, trying to overcome the typeinfo/vtable with some help.
ChatGPT suggests that it is may be related to no-rtti, while I do see it is a CFLAG that is being specified, forcing it off does not work.
I have now basically extracted the .cpp and build a separate .so. That has the typeinfo information. But obviously that causes yet another issue. ImportError: /home/skinkie/Sources/reproduced/build2/bindings2/pyqmaplibre.so: undefined symbol: _ZN6PySide18initQObjectSubTypeEP11_typeobjectP7_objectS3_
I really wonder why the Wigly Widget does not have any of these crazy issues.
Ссылка
click to show
I managed to get it to work. But I doubt this is the way forward. The way I got the thing to work was by manually selecting the cpp files that defined the widget. Similar to how Wigly works. But that does not work for a complex project. For example the argument that I must provide to the widget is a type that virtually includes half of the C++ project. What I would I expect is that it would be possible to state "I want to have these C++ objects" in the binding, and use the compiled shared object as a reference. What the net result is, is that it feels virtually impossible to reach that goal. I'll again clean up the repo and commit the result. http://stefan.konink.de/maplibre.png
S
@jeandet In essence is my question, is it expected that the typeinfo stuff is not available, or is it some sort of "artifact" of mapbox-native-gl. I have tried to set -frtti but that is still ignored.
A
I don't think so, shiboken basically generate wrapper classes for each class in your project (depending on your XML) and builds a regular Python extension module which is a regular dynamic library. If you can use your library in a regular Qt C++ project you can wrap it.
I found where in mapbox gl the no-rtti stuff is set, currently checking if it now magically works. It is compiled with rtti now, but the same applies regarding TIN symbols.
S
@jeandet I think I got it, including what my issue was. 1. rtti was basically disabled by maplibre, got that fixed now 2. my *_wrapper generated cpp files from shiboken were not included for the extra objects I created I am currently trying to get some of the objects in there which cause some additional issues between shiboken and the mapping, likely require signature changes, but committed to get it to work.
22 July 2025
I am trying to create more advanced bindings. But any variant where typedef-type is used causes a segmention fault when running Shiboken6. Any clues? <container-type name="QPair" type="pair"/> <typedef-type name="Coordinate" source="QPair&lt;double,double&gt;"/>
AbstractMetaBuilderPrivate::traverseTypesystemTypedefs (this=this@entry=0x555555b38b80) at /home/skinkie/Sources/pyside-pyside-setup/sources/shiboken6/ApiExtractor/abstractmetabuilder.cpp:1077 1077 sourceType.setTypeEntry(metaClass->templateBaseClass()->typeEntry());
29 July 2025
Ссылка
click to show
I am trying to compile WigglyWidget under Windows, after I got linking issues with my custom widget, I end up in the same Shiboken errors. Similar to Linux I am using aqtinstall. I copied the first few lines. Since Shiboken6.abi3.lib is mentioned, and it looks lik statically lined. What could it be missing. https://stefan.konink.de/linking_win64.txt I had to comment out the NODEFAULTLIB lines, since the linker initially complained about them, not able to find Python to link to. https://github.com/skinkie/wigglywidget/blob/master/CMakeLists.txt#L261
S
Friend ChatGPT suggests this is due to linking to .lib (targeted to msvc) vs mingw which I am now using...
30 July 2025
S
To do stuff on Windows: "c:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat" aqt install-qt windows desktop 6.9.1 win64_msvc2022_64 pip install pyside6 shiboken6 mkdir build cmake .. -G "NMake Makefiles" -DCMAKE_PREFIX_PATH="C:\Users\Gebruiker\PycharmProjects\badger\6.9.1\msvc2022_64" -DCMAKE_BUILD_TYPE=Release nmake
31 July 2025
S
Hope for some guidance. qt.shiboken: (bindings) /home/skinkie/Sources/reproduced/maplibre-native-qt/vendor/maplibre-native/include/mbgl/renderer/query.hpp:16: Stripping argument #1 of void mbgl::RenderedQueryOptions::RenderedQueryOptions(std::optional<std::vector<std::string> >,std::optional<mbgl::style::Filter>) due to unmatched type "std::optional<std::vector<std::string> >" with default expression "std::nullopt": Unable to translate type "std::optional<std::vector<std::string> >": Cannot find type entry for "std::optional". Documention mentions: https://doc.qt.io/qtforpython-6/shiboken6/typesystem_specifying_types.html#typedef-type Now that would be analogue to? <namespace-type name="std"> <value-type name="optional" generate="no"/> </namespace-type> <typedef-type name="StringVectorOptional" source="std::optional&lt;std::vector&lt;std::string&gt;&gt;"/> Now that does not seem to be the case: qt.shiboken: (bindings) template baseclass 'std::optional<std::vector<std::string>>' of 'StringVectorOptional' is not known Any suggestions?
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