Results 1 to 2 of 2

Thread: Removing rows from table model

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2007
    Posts
    301
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    46
    Thanked 3 Times in 3 Posts

    Default Removing rows from table model

    Hi,

    I have the following code which I thought would remove a certain amount of rows from my table model :

    Qt Code:
    1. beginRemoveRows( QModelIndex(), 0, m_Data.count() / 4 );
    2. for( int i = 0; i < m_Data.count() / 4; i++ )
    3. QAbstractItemModel::removeRow( i );
    4. m_Data.clear();
    5. endRemoveRows();
    To copy to clipboard, switch view to plain text mode 

    m_Data is a QList<QString> object. After this function is called, the rows are still there? Guess I'm doing something wrong

    Any help is appreciated,
    Regards,
    Steve
    Last edited by steg90; 14th June 2007 at 16:20.

Similar Threads

  1. MYSQL 5 Table qt model as small Mysql admin
    By patrik08 in forum Qt-based Software
    Replies: 0
    Last Post: 1st May 2007, 09:43
  2. Table Model / View Problem -- Data Not Displaying
    By jhendersen in forum Qt Programming
    Replies: 1
    Last Post: 22nd April 2007, 06:45
  3. Relational table model Calulation
    By aekilic in forum Qt Programming
    Replies: 8
    Last Post: 7th February 2007, 23:40
  4. QT Table Model
    By aekilic in forum Qt Programming
    Replies: 15
    Last Post: 24th January 2007, 12:57
  5. Table model / view editing issue
    By Caius Aérobus in forum Qt Programming
    Replies: 9
    Last Post: 7th April 2006, 11:03

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
  •  
Qt is a trademark of The Qt Company.