ChatCrawlersearch across public Telegram Open the app
Q

Qt for Python (PySide/Shiboken)

15 January 2020
2020-01-15×
15 January 2020
J
Hi, Hi can't make Qobject.findChildren work with delegate. qml ListView { width: parent.width height: parent.height model: [1,2,3,4,5] objectName: "blob" delegate: Button { objectName: "bla" height: 100 width: parent.width text:"mokok" + modelData onClicked: ddb.child(root) } }and on the python side, inside de ddb QObject : python @Slot(QObject) def child(self, un): print(un.findChildren(QObject, QRegExp('bla')))it retuns []. Using other objectName works well. I only have this matter with delegate not with other stuff. any idea on it ?
J
actually it was for testing purpose
The problem with Delegate is that you don’t know how many are going to be created and QObjects with same name is usually undefined
A well written qml code has zero objectNames
T
As you don’t need that to reference in c++ code
J
So there is no way to test the app with the python code ?
T
I’m no Python specialist, there are better people to talk to you about this but probably they are asleep by now as it’s almost 22 in Germany
Calendar: January 2020
MoTuWeThFrSaSu123456789101111213141510163117918192021192262322242252612772877291530231
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