Is it possible to have different text styles in a single cell of QTableView?
I'm using QTableView and, after some effort, a custom model (subclass of QAbstractTableModel). Each row should correspond to a single employee, with image in the first column, department in the third, but multi-line text in the second column as 'depicted' below. I want to make line1 bold/bigger text/different colour. Any pointers will be appreciated.
--------------------------------------------------
| image | Name Surname (line1) | Department |
| | employeeID, email (line2) | |
--------------------------------------------------
--------------------------------------------------
| image | Name Surname (line1) | Department |
| | employeeID, email (line2) | |
--------------------------------------------------
To copy to clipboard, switch view to plain text mode
BTW, will this work with expected results (2 lines) on all platforms?
cellText = line1 + "\n" + line2;
QString cellText;
cellText = line1 + "\n" + line2;
To copy to clipboard, switch view to plain text mode
Bookmarks