ChatCrawlersearch across public Telegram Open the app
Q

Qt for Python (PySide/Shiboken)

4 June 2021
2021-06-04×
4 June 2021
Фотография
click to show
This widget has a form layout. How can i make it add another row just like this when the pushbutton is clicked?
I
I mean, it will need to create new lineEdit and pushButton objects each time and name them dynamically
F
you'd create those objects and add them to the layout - then either get it back from the layout later, or maybe save them yourself somewhere (e.g. self._new_button or whatever, ideally with a more descriptive name)
Wow! I just found out that this can be done using the "object name". It surprised me that we can use the same variable name for each new lineEdit, yet we can access them later using their object name via findChild method
I
Https://www.dpaste.org/qMa8
F
well, you can, but it'd be easier/cleaner if you saved it in self
F
might need to store a list of buttons or something? Not sure yet what you're trying to do exactly :)
Фотография
click to show
Whenever i click the + button i want to add a new row just like this and also print the text inside the lineEdit next to the + button
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