Skip to content
  • 0 Votes
    5 Posts
    20k Views
    C

    @Hamed I had the same question and found this old thread. After thinking a while about this I had this idea:
    Do it in an object oriented way! Define a sub-class of QPushButton which contains all the information you need to delete what you want. Add an "action" slot to your sub-class, connect this slot with the clicked() signal and do the delete in this
    slot. Then instead of adding a QPushButton to the model add an object of your sub-class to the model!