Best way to implement a Button for an action in a QTableView



  • I need a simple QPushButton in all rows in a specific column which performs an action (for the row).
    I want no twice click to first enable an editor and then click the button.

    There seem a lot of possible methods - what method is common used.



  • I'd implement a delegate that does the painting and nothing else and connect a slot to QAbstractItemView::clicked to handle the event as you don't have to worry about identifying what button was clicked


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.