Allocate the delegate object on the heap so it won't get destroyed as soon as it gets out of scope:
Qt Code:
checkboxDelegate* delegate = new checkboxDelegate(this); ui.tableTV->setItemDelegate(delegate);To copy to clipboard, switch view to plain text mode
Edit: oops, forgot the important keyword new![]()





Reply With Quote
Bookmarks