Originally Posted by
wysota
... set Qt::TextAlignmentRole for the item to Qt::AlignCenter.
Using Qt::AlignCenter doesn't center the icon.
This is my code; note that TableCell subclasses QTableWidgetItem (it only adds the '<' operater to accomplish a sort via tooltip text).
setItem( m_nCurrRow, COL_Status, new TableCell( "" ) );
item( m_nCurrRow, COL_Status )->setTextAlignment( Qt::AlignCenter );
setItem( m_nCurrRow, COL_Status, new TableCell( "" ) );
item( m_nCurrRow, COL_Status )->setTextAlignment( Qt::AlignCenter );
To copy to clipboard, switch view to plain text mode
It appears that there is no easy way to do this.
Bookmarks