Model based vs Item based



  • Hi,

    i need a tree widget to display some text (similar to the registry tree). The text should be selectable and i'd like to have right klick support. So if i do a right klick there appears a little context menu.

    I saw two different version in the designer:

    1. model based
    2. item based

    What is the differences and which should i select for my use??



  • Genesis 1:3

    And God said:"Use QAbstractItemModel interface". and QAbstractItemModel interface was used

    I'm a bit overly dogmatic here but that's my advice always. The QAbstractItemModel is the one the whole model-view framework relies upon so if you use that interface you are assured it will work regardless of what model and view you use it in. The QStandardItem interface only works with QStandardItemModel (either explicitly or implicitly like in Q[...]Widget classes)



  • @VRonin Amen



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