kazek3018
13th February 2011, 22:31
Hello.
I have my own class derived from QAbstractTableModel. When I'm select a column in QTableView header font is going to be bold. I try to play with Qt::FontRole for headerData() function, but this is not avoid font to be bold. Any idea how to do it?
Main problem is how to enable sorting in QComboBox. I have proxy model (with source from that QTableModel) which make behaviour like QListView for QComboBox. For this proxy I overwrite lessThan() function, but QComboBox in function view() return pointer to QAbstractItemView which do not have setSortingEnabled() (QListView do not have to). How to use lessThan function to sorting this proxy model?
Many thanks.
I have my own class derived from QAbstractTableModel. When I'm select a column in QTableView header font is going to be bold. I try to play with Qt::FontRole for headerData() function, but this is not avoid font to be bold. Any idea how to do it?
Main problem is how to enable sorting in QComboBox. I have proxy model (with source from that QTableModel) which make behaviour like QListView for QComboBox. For this proxy I overwrite lessThan() function, but QComboBox in function view() return pointer to QAbstractItemView which do not have setSortingEnabled() (QListView do not have to). How to use lessThan function to sorting this proxy model?
Many thanks.