Adding button to QTableview

Viewed 33616

I have created one table by using QTableview and QAbstractTableModel . In one of the cells, I want to add one help button in the right corner of that cell.

Is there any way to achieve this?

6 Answers
    // use only standard style  
QApplication::style()->drawControl(QStyle::CE_PushButtonLabel, &button, painter);

For use user styles, need changed:

    //use user style   
QPushButton* real_button = ....; // button inherited user styles
    real_button->style()->drawControl( QStyle::CE_PushButtonLabel, &button, painter, real_button);
Related