Results 1 to 2 of 2

Thread: About QStandardItemModel removerow

  1. #1
    Join Date
    May 2013
    Posts
    2
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Question About QStandardItemModel removerow

    Hi,I am a beginner.
    I use qt5 mvc to display some data for table,i use QStandardItemModel to apendrow for adding and removerow for deleting.
    i want to know when i call removerow ,should i use delete for the qlist of QStandardItem which i new on appedrow for detectiong memory ?
    thank.

  2. #2
    Join Date
    Mar 2011
    Location
    Hyderabad, India
    Posts
    1,882
    Thanks
    3
    Thanked 452 Times in 435 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    15

    Default Re: About QStandardItemModel removerow

    i want to know when i call removerow ,should i use delete for the qlist of QStandardItem which i new on appedrow for detectiong memory ?
    delete is not required, removeRow() will remove item and delete it.
    When you know how to do it then you may do it wrong.
    When you don't know how to do it then it is not that you may do it wrong but you may not do it right.

Similar Threads

  1. Weird removeRow behavior
    By metalinspired in forum Qt Programming
    Replies: 0
    Last Post: 30th August 2009, 12:42
  2. QTableWidget/RemoveRow
    By navi1084 in forum Qt Programming
    Replies: 0
    Last Post: 28th November 2008, 11:01
  3. QtSqlQueryModel removeRow's problem
    By qtman in forum Qt Programming
    Replies: 3
    Last Post: 26th February 2008, 11:28
  4. RemoveRow problem
    By nategoofs in forum Qt Programming
    Replies: 4
    Last Post: 18th August 2007, 13:11
  5. QTable removeRow with large table
    By PrimeCP in forum Qt Programming
    Replies: 1
    Last Post: 27th March 2007, 07:59

Tags for this Thread

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.