Results 1 to 2 of 2

Thread: Slow QStandardItem::setChild

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2013
    Posts
    38
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Slow QStandardItem::setChild

    Hi,

    I have QStandardItemModel model.

    When I add an item to the invisibleRootItem() of the model with setChild, it takes me arond 200 ms.
    When I add an item to an item of the model with setChild, it takes me around 0 ms.

    Why is it slow ? How to do it better (because I really want to add items to the invisibleRootItem()) ?

    Thanks.

    Temporary answer :
    I had this effect when I was doing on the item (or on the invisible) a setRowCount and a setColumCount.
    I still have something slow...I need to figure out where it is...
    Last edited by moijhd; 29th April 2014 at 13:40.

Similar Threads

  1. Replies: 2
    Last Post: 22nd August 2013, 10:50
  2. QStandardItemModel and QStandardItem
    By DmitryNik in forum Newbie
    Replies: 5
    Last Post: 9th October 2011, 17:17
  3. Replies: 3
    Last Post: 29th October 2010, 23:26
  4. invisibleRootItem question
    By QXiaoWang in forum Qt Programming
    Replies: 1
    Last Post: 25th October 2010, 11:28
  5. setObjectName for QStandardItem
    By abk883 in forum Newbie
    Replies: 1
    Last Post: 20th May 2010, 18:20

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.