ChatCrawlersearch across public Telegram Open the app
Q

Qt for Python (PySide/Shiboken)

сообщение · 2024-11-20 22:19 UTC
L
I think I found the culprit! I have some custom delegates on most of my models to accept both comma and dot decimal separated numbers and cohere both to dot notation. If I remove these delegates from the QTableView the problem disappears. It does not solve the layout problem on the left though... As a reference this is the code for one of the delegates: class NumberFormatDelegate(QItemDelegate): def __init__( self, parent=None, bottom: float = -float("inf"), top: float = float("inf"), decimals: int = -1, ) -> None: super().__init__(parent) self.bottom = bottom self.top = top self.decimals = decimals def createEditor(self, parent, option, index): editor = LineSpinBox( parent, bottom=self.bottom, top=self.top, decimals=self.decimals, ) return editor def setEditorData(self, editor, index): data = index.data(Qt.DisplayRole) editor.setText(data) def setModelData(self, editor, model, index): model.setData(index, editor.text(), Qt.EditRole) LineSpinBox is just a subclass of a LineEdit with some validation on top.

All messages on 20 November 2024 · Whole feed · оригинал в Telegram

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