Results 1 to 5 of 5

Thread: Performance issue

  1. #1
    Join Date
    Jun 2010
    Posts
    10
    Thanks
    3
    Qt products
    Qt4

    Default Performance issue

    Hello,
    I´m currently facing a performance problem with QTreeWidgets. Lets says I have about 3000 elements in a hierachial tree and furthermore two rows. The first row is for the standard selection and the second contains some checkboxes which can also be checked. For both I implemented the exactly same "intelligent" algorithm of marking further subelements etc.

    When use the standard selection to mark the root element it takes about 2 sec. to mark (select) all subelements - but if I use the root checkbox it takes only 0.1 sec to mark (set checkboxvalue same as root) all subelemts. I quess that setting the background color of an element is responsible for this slow down - any ideas how I can speed it up???? I tried it with the setUpdatesEnabled() function but that didn´t helped.

    best regards - Skorpien126

  2. #2
    Join Date
    Jun 2010
    Posts
    10
    Thanks
    3
    Qt products
    Qt4

    Default Re: Performance issue (Sample Included)

    Hi All...
    I´ve build an simple sample to show my problem. It´s not very nice but it show my problem. Has anyone an idea what could be wrong.
    Thanks in advance . Stefan

    See the attachment for the example.
    Attached Files Attached Files

  3. #3
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Performance issue (Sample Included)

    Have you tried using a QTreeModel rather than QTreeWidgets? Seperating the data and views could give you a performance increase.

  4. The following user says thank you to squidge for this useful post:

    Skorpien126 (2nd July 2010)

  5. #4
    Join Date
    Jun 2010
    Posts
    10
    Thanks
    3
    Qt products
    Qt4

    Default Re: Performance issue (Sample Included)

    Sorry for answering so lately - but yes - I´ve also tried this. Unfortunately this didn´t helped.

    Can someone please take a look at the example - I need a further opinion!
    Last edited by Skorpien126; 28th June 2010 at 13:01.

  6. #5
    Join Date
    Jun 2010
    Posts
    10
    Thanks
    3
    Qt products
    Qt4

    Default Re: Performance issue (Sample Included)

    After creating subclasses of QTreeWidget/QTreeWidgetItem and implementing my own setSelected function I got an enourmous speed up - but nevertheless it would have been interesting to know why the org. implementation is so "slow".

Similar Threads

  1. QDoubleSpinBox setValue() performance issue
    By Cruz in forum Qt Programming
    Replies: 7
    Last Post: 16th February 2009, 22:31
  2. Performance Issue
    By linuxdev in forum Qt Programming
    Replies: 1
    Last Post: 10th December 2008, 16:00
  3. Qt performance
    By yagabey in forum Qt Programming
    Replies: 3
    Last Post: 22nd October 2008, 23:05
  4. UDP Performance bad
    By tigertap in forum Qt Programming
    Replies: 5
    Last Post: 17th March 2008, 17:53
  5. performance issue(QGV + QPixmap::grabWidget)
    By momesana in forum Qt Programming
    Replies: 4
    Last Post: 27th September 2007, 12:31

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.