I have a QTableWidget which contains cells which may or may not contain QIcons in them. When I align the texts of cells with icons in them, they are centered more right than cells without icons in them.
offset icon text alignment.jpg
How do I make the text in cells with icons center so that they align with the entire cell, and not the text portion of the QTableWidgetItem?
I tried:
Qt Code:
To copy to clipboard, switch view to plain text mode
I have read into similar threads describing the use of QItemDelegates when considering icon alignment, but does this method work for QTableWidgetItems via medelling with the Qt:isplayRole portion of QItemDelegate or am I completely off?
Bookmarks