Important: Please read the Qt Code of Conduct -

Need help on QAbstractItemView/QAbstractItemDelegate?

  • Hi, I'm new to programming and Qt, pardon me if I'm asking anything stupid. I have a doubt regarding QListView. I have a populated model with 3 keys, I need to add Radio Buttons to each index. I initially used QListView which couldn't help me achieve that. I realized I needed a delegate to do that. QTreeView usually uses QStyledItemDelegate so what should I do to have a list view with radio buttons. I read on Qt forum which said I need to use QAbstractItemView, so I was wondering if I need to QAbstractItemView instead of QListView or subclass QAbstractItemDelegate and then use QAbstractItemView? If I'm subclassing which function do I need to use.

Log in to reply