Opened 4 years ago

Closed 16 months ago

Last modified 16 months ago

#5407 closed defect (fixed)

Display HTML within table

Reported by: Zach Pearson Owned by: pett
Priority: blocker Milestone:
Component: General Controls Version:
Keywords: Cc:
Blocked By: Blocking: 5401, 5401
Notify when closed: Platform: all
Project: ChimeraX

Description

Involves implementing a QStyledItemDelegate subclass.

Change History (7)

comment:1 by Zach Pearson, 4 years ago

Blocking: 54015401, 5401

comment:2 by Zach Pearson, 4 years ago

I have this nearly working; the only issue left to solve is that the column affected by the delegate will display text over other columns if the column's width is decreased. Do you think the delegate should go in the UI bundle or stay in the blastprotein bundle?

comment:3 by pett, 4 years ago

Well, in the ItemTable class if it's not a nightmare. I imagine this would involve adding as_html=True/False to ItemTable.add_column(). But again, if it's much more difficult to do this generically, then just do it for blastprotein.

comment:4 by Zach Pearson, 4 years ago

It's not. The before launch case is trivial. For the after launch case, we can change pending_columns to a column,html tuple and loop through them instead of extending columns, setting their delegates if need be.

comment:5 by Zach Pearson, 4 years ago

Looks like the real nightmare is getting rich text to elide when we collapse the column...

comment:6 by pett, 16 months ago

Resolution: fixed
Status: assignedclosed

Table columns initialized with "is_html=True" will support HTML markup for that column.

Fix: https://github.com/RBVI/ChimeraX/commit/154e551a47bae5642bcd58faec9f2fd1e05bc4e8

comment:7 by Zach Pearson, 16 months ago

Wow, thanks!

Note: See TracTickets for help on using tickets.