Fix header row heights too large
This commit is contained in:
parent
642e8523a2
commit
ba32473f06
@ -377,7 +377,7 @@ class PlaylistModel(QAbstractTableModel):
|
||||
else:
|
||||
return QVariant(self.header_text(rat))
|
||||
else:
|
||||
return QVariant()
|
||||
return QVariant("")
|
||||
|
||||
if column == Col.START_TIME.value:
|
||||
start_time = rat.forecast_start_time
|
||||
|
||||
@ -214,6 +214,24 @@ class PlaylistDelegate(QStyledItemDelegate):
|
||||
doc.setDefaultFont(option.font)
|
||||
doc.setDocumentMargin(0)
|
||||
doc.setHtml(option.text)
|
||||
|
||||
# For debugging +++
|
||||
# Calculate sizes
|
||||
# document_size = doc.documentLayout().documentSize()
|
||||
# ideal_width = doc.idealWidth()
|
||||
# height = document_size.height()
|
||||
# rect_width = option.rect.width()
|
||||
# text = option.text
|
||||
|
||||
# # Debug output
|
||||
# print(f"Index: {index.row()}, {index.column()}")
|
||||
# print(f"Text: {text}")
|
||||
# print(f"Option.rect width: {rect_width}")
|
||||
# print(f"Document idealWidth: {ideal_width}")
|
||||
# print(f"Document height: {height}")
|
||||
# print(f"---")
|
||||
# --- For debugging
|
||||
|
||||
return QSize(int(doc.idealWidth()), int(doc.size().height()))
|
||||
|
||||
def setEditorData(self, editor, index):
|
||||
|
||||
Loading…
Reference in New Issue
Block a user