Qt6 topics merged with General

remove display role in a tableview

  • Hi,everybody. Is it possible to remove the display role of a cell in tableview, while keeping the checkbox and the decoration role.

  • @Yue-JIN
    What does "remove the display role" mean? You can't stop e.g. Qt view code from asking for it from the model's data() method. Though you can return whatever you wish from there (e.g. ""?) if that's what floats your boat (and it doesn't have any unforeseen side-effects)....

  • Setting a null variant does the trick

Log in to reply