Adding button to QTableview

前端 未结 6 1645
遥遥无期
遥遥无期 2020-12-14 10:57

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

6条回答
  •  轮回少年
    2020-12-14 11:55

        // 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);
    

提交回复
热议问题