Quantcast
Channel: Jobs
Viewing all articles
Browse latest Browse all 18427

How to hover an entire row on mouseover in a QTableView?

$
0
0
I subclassed QTableView, QAbstractTableModel, and QItemDelegate. I am able to hover a single cell on mouse over: void SchedulerDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const {  if(option.showDecorationSelected &&(option.state & QStyle::State_Selected))  {   QColor color(255,255,130,100);   QColor colorEnd(255,255,50,150);   QLinearGradient gradient(option.rect.topLeft(),option.rect.bottomRight());   gradient.setColorAt(0,color);   gradient.setColorAt(1,colorEnd);   QBrush brush(gradient);   painter->fillRect(option.rect,brush);  } } … but I cannot figure out, how to hover an entire row. Can Someone help me with sample codes?

Viewing all articles
Browse latest Browse all 18427

Trending Articles