Create names for columns

Addresses #17 but it feels like we should have these definitions
in the dbConfig.  Which leads to the question of moving from
QtSql to Pony ORM
This commit is contained in:
Christopher T. Johnson
2025-02-26 16:47:33 -05:00
parent be07589f24
commit 6129258f1b
3 changed files with 36 additions and 22 deletions

View File

@@ -34,6 +34,7 @@ from PySide6.QtWidgets import (
QWidget,
)
from docketModel import docketModel
from pdfView import PDFViewer
@@ -84,6 +85,7 @@ class docketEntry(QTextEdit):
class docketTableView(QTableView):
manager: QNetworkAccessManager
clickedEvent = Signal(QPoint)
anchorSignal = Signal(QModelIndex, str)
@@ -139,7 +141,7 @@ class docketTableView(QTableView):
red = QPalette()
red.setColor(QPalette.ColorRole.Base, Qt.GlobalColor.red)
for row in range(0, model.rowCount()):
index = model.index(row, 1)
index = model.index(row, docketModel.ColumnNames.text)
widget = docketEntry()
widget.setHtml(model.data(index, Qt.ItemDataRole.DisplayRole))
widget.setAutoFillBackground(False)