ChatCrawlersearch across public Telegram Open the app
Q

Qt for Python (PySide/Shiboken)

11 October 2023
2023-10-11×
11 October 2023
C
that's for the standalone tool we provide, in case people want to use it with other shiboken-generated proyectos
A
It seems that the pyi-type attribute of the modify-argument tag eats the argument default value. I've dug to sources/shiboken6/ApiExtractor/typesystemparser.cpp and the parseModifyArgument function there. However, when I comment the argumentModification.setPyiType(pyiType); line out and re-run python setup.py build --reuse-build --module-subset=Core, I keep seeing that the types are replaced as before. Is the CPP file a wrong place?
S
I am trying to understand a very specific concept, which I am currently going deep down the rabithole. If one would consider a QComboBox. And this QComboBox is connected via a QDataWidgetMapper. Under the hood there is likely some QItemDelegate that does the magic where the model can have a plain string, and the QComboBox would correctly select the right item. Where / when does this text to currentItemIndex happen? What is basically the slot that is connected? Bigger question: what should a widget implement so it would not require custom QItemDelegates in the code by the user?
A
Ë
Cristián 🥑that's for the standalone tool we provide, in case people want to use it with other shiboken-generated proyectos
Ссылка
click to show
Ok, yeah. But here: https://code.qt.io/cgit/pyside/pyside-setup.git/tree/sources/pyside6/PySide6/support/generate_pyi.py#n39 you do: from PySide6.support.signature.lib.pyi_generator import generate_pyi I'd assume that I could look in there via https://code.qt.io/cgit/pyside/pyside-setup.git/tree/sources/pyside6/PySide6/support/signature/lib/pyi_generator.py But this does not exist. So I searched it and found it there^ Are there different versions of this file?
A
I'm about to give up. I've pushed the changes being unable to test them. There are people more clever than me.
C
Remember to add reviewers, otherwise they will probably bee forgotten. You can add "pyside" as a reviewer. Is a group with all the core devs
C
(I'm certain more people will benefit if you have that conversation here though, but that is only my opninon 👀)
A
Christian Tismer-SperlingAnton, if you want to know more about .pyi generation in PySide, I can give you every info. Maybe we should contact in private.
Thanks a lot! By now, the only question that bothers me is that no changes in the code of shiboken6-generator are applied to the produced *.pyi files. I command python setup.py build --reuse-build --module-subset=Core, it compiles the changes files related to shiboken6-generator, but the files remain the same (although re-written). I'm about to leave the work earlier today. Tomorrow I'll PM you if I may.
C
@StSav012 Ok. Just for short: You can change the XML. That will generate different binaries when you compile (probably better with a full build), and the executable code will then be introspected by the pyi generator. See you tomorrow.
S
Ссылка
click to show
Would anyone have a hint if there is a possibility to resolve this already 10 year old issue? It basically boils down to that each time setText is applied on a QLineEdit the cursor moves to the end of the widget. The hints on multiple places is: store the cursor position. But the more practical question is, if this is part of a DataWidgetMapper, how could you do this in a non-hacking way, preferably from the model directly. https://stackoverflow.com/questions/15801259/qlineedit-cursor-moves-to-end-after-textchanged-or-commitdata
C
@skinkie but that is a Qt question. We are providing the Python wrapper as good as we can, but are not involved in Qt design problems. Maybe that's because of the Qt for Python name. PySide was less misleading.
Calendar: October 2023
MoTuWeThFrSaSu1239456578398102611171221314115167171218151916202122231624125226127428293031
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