ChatCrawlersearch across public Telegram Open the app
Q

Qt for Python (PySide/Shiboken)

1 December 2020
2020-12-01×
1 December 2020
I
OK I have a design question. I have made a two button function to change languish. Should the button names be in a tuple or in a file from which I read one line at a time and use it to populate a tuple and then change names of the buttons on the UI?
I
not sure this is the right place to post my question. Can anyone give me an idea or point me in the right direction about how to select items from a tableview and have those items load into a different tableview where they can then be saved as a group (as a state or profile) to recall? Kind of like selecting ingredients for a recipe so to speak.
I
Hi ! Cannot find a simple way to just adjust row height in a QTreeWidget ... :(
I
yes ! But this is not trivial.. I wonder why a setRowHeight doesn't exist here
I wonder if it would work (and be easier) to use .setData(col, Qt.SizeHintRole, QSize(...)) on the QTreeWidgetItem?
F
and with setUniformRowHeights(True) on the widget you probably only need to do it for the first item
wait, there's even QTreeWidgetItem.setSizeHint
though it doesn't actually work, at least not how I'd expect it to :D
F
this does though: from PySide2.QtCore import Qt, QSize from PySide2.QtWidgets import QTreeWidget, QTreeWidgetItem, QApplication app = QApplication([]) w = QTreeWidget() items = [QTreeWidgetItem([str(i)]) for i in range(10)] size = items[0].sizeHint(0) items[0].setData(0, Qt.SizeHintRole, QSize(size.width(), 50)) w.setUniformRowHeights(True) w.insertTopLevelItems(0, items) w.show() app.exec_()
Calendar: December 2020
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