To Insert Rows in a Table View



  • Hi,how to insert rows in a tableview at (i,j)?Am confused with using setItemDelegate.



  • setItemDelegate does something completely unrelated. It determines how items are renderend.

    If you are using a table view, you are also using a model. The view just displays that model, but it does not control the data. For that, access the model itself. Perhaps you can tell us what kind of model you are using?



  • [quote author="Andre" date="1320060795"]setItemDelegate does something completely unrelated. It determines how items are renderend. [/quote]
    And edited.



  • [quote author="Gerolf" date="1320087561"]
    [quote author="Andre" date="1320060795"]setItemDelegate does something completely unrelated. It determines how items are renderend. [/quote]
    And edited.

    [/quote]
    Yeah, but I did not want to complicate things further :-)



  • Am using a TableWidget for call logs but large number of entries(150 entries) it is very slow to load.Hence,want to implement the same using a table view for the same.So,will I be able to access the tableview as I do with tablewidget?



  • No, they work in a different way (even though the *widget version is a subclass of the *view version), and the one is not going to faster than the other in all cases.

    As I already tried to explain to you: to get to your data, you access the model, not the view.


Log in to reply
 

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