Results 1 to 4 of 4

Thread: Need an explanation about begininsertrows.endinsertrows.

  1. #1
    Join Date
    Sep 2010
    Posts
    654
    Thanks
    56
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Need an explanation about begininsertrows.endinsertrows.

    I dont understand this process.
    I see how the tablemodel::data reimplemented is asking me data for a row, col. I return data from my own data-sytem (for example a map).
    Ok, if I insert rows or cols, begininsert-endinsert does nothig with my map , isn't it ?
    So, what is the mission of this ?
    Imagine I have 1,2,3,4,5 rows. I insert a new row at position3, so I have
    1,2,new,3,4,5.
    Now, tablemodel::data are going to ask me data for 1,2,3,4,5,6. So I dont understand the mission of begininsert-endinsert. Besides, the rowcount are also reimplemented.
    Begin-end is not neccesary if I have my own data system?
    Any help ? Thanks

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Need an explanation about begininsertrows.endinsertrows.

    Quote Originally Posted by tonnot View Post
    Ok, if I insert rows or cols, begininsert-endinsert does nothig with my map , isn't it ?
    So, what is the mission of this ?
    It informs the views what parts of model have been inserted or removed and it updates the list of persistent indexes.

    Begin-end is not neccesary if I have my own data system?
    It's necessary.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Sep 2010
    Posts
    654
    Thanks
    56
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Need an explanation about begininsertrows.endinsertrows.

    Thank WY.
    Can explain more in detail the mission of 'the list of persistent indexes.' ?
    What information are they store ?
    Thanks

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Need an explanation about begininsertrows.endinsertrows.

    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. beginInsertRows() after adding new data
    By UVV in forum Qt Programming
    Replies: 4
    Last Post: 18th November 2010, 21:54
  2. explanation for Qstring to int
    By qtlinuxnewbie in forum Newbie
    Replies: 1
    Last Post: 11th February 2010, 06:52
  3. beginInsertRows seems not to be working
    By ugurkoltuk in forum Qt Programming
    Replies: 3
    Last Post: 6th January 2010, 14:21
  4. beginInsertRows was not declared ???
    By travlr in forum Qt Programming
    Replies: 2
    Last Post: 6th June 2009, 21:22
  5. Replies: 19
    Last Post: 11th May 2007, 11:23

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.