ChatCrawlersearch across public Telegram Open the app
Q

Qt for Python (PySide/Shiboken)

23 June 2021
2021-06-23×
23 June 2021
V
Hi! Does someone maybe know how to avoid normalizing of function arguments in shiboken6? I try to make a binding for function(constructor) with signature Query(const std::initializer_list<QPair<QString, QString>>& l). It transforms first QPair to std::pair and I get an error, because there is no constructor with signature Query(const std::initializer_list<std::pair<QString, QString>>& l) . I tried to avoid that by using <modify-argument>: <modify-argument index="1"> <replace-type modified-type="std::initializer_list&lt;QPair&lt;QString, QString&gt;&gt;" /> </modify-argument> Unfortunately it has no effect.
The modify-argument + replace-type is limited to the few cases we have discovered in the Qt API, so I'd not expect to work in that regard, mainly because there is no way to handle an expression with a std::initializer_list, inside the typesystem for Qt Core you can see a : <rejection class="*" argument-type="^std::initializer_list&lt;.*$"/>, meaning pyside doesn't support it. I think the only solution will be for you to create your own replace-type functions, or create a different signature for 'Query' that accept something else, and internally call the constructor with the initializer_list<QPair.....
C
(In any case, I'd encourage you to open a user-story on JIRA so we can evaluate if it would be possible to add such feature)
Calendar: June 2021
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