Skip to content

Tag: python

Using ListModel (Python/Pyside6) in QML

I have a ListView in QML and want to populate it with data from a AbstractListModel that I created in Python. AbtractListModel.py (I removed methods like rowCount() to keep the example lucid) Student.py ListView.qml How can I access name and age of a student in the delegate to show them where I used “#n…

regex convert to object

I’m trying to get the value as regex as follow: But I can get the only single value such as “fixed-address” and “host2name”. In “domain-name-servers” I did with “,” in regex. But I think it isn’t the right way because the values are not same count. C…

how to direct python to fetch string in a different file

how do i change the “keyword” in parameter (‘pegasus’) to redirect to a separate txt file. so later I just write whatever items I want to scrape in the file txt. Example of Pegasus, Phoenix, Lucid then the keyword parameter is directed to a different txt, inside the txt it contains a l…