Results 1 to 5 of 5

Thread: QTableWidget with many cellwidgets update very slow!

  1. #1
    Join Date
    Nov 2012
    Posts
    4
    Qt products
    Qt4
    Platforms
    Windows

    Default QTableWidget with many cellwidgets update very slow!

    I have a QTablWidget which has 10 columns and about 100-200 rows. Every row has 3 cellwidgets of QLabel type.
    The problem is the qtablewidget udpate very slow, taking more than 5 seconds.
    I want the update quickly.
    How can I improve its performance??
    ThankS!
    Last edited by linxs; 17th November 2012 at 16:46. Reason: more information.

  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: QTableWidget with many cellwidgets update very slow!

    Don't use cell widgets.
    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
    Nov 2012
    Posts
    4
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QTableWidget with many cellwidgets update very slow!

    I want to implement customized drag and drop for item in qtablewidget, so I use qlabel as cellwidget.
    If no use cellwidget, then what to use?

  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: QTableWidget with many cellwidgets update very slow!

    Quote Originally Posted by linxs View Post
    I want to implement customized drag and drop for item in qtablewidget, so I use qlabel as cellwidget.
    If no use cellwidget, then what to use?
    You don't need cell widgets to have custom drag and drop. QTableWidget already offers required facilities. Even more is offered if you use a proper model-view approach (i.e. QTableView nad QAbstractTableModel subclass instead of QTableWidget).
    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.


  5. #5
    Join Date
    Nov 2012
    Posts
    4
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QTableWidget with many cellwidgets update very slow!

    Thanks!

    Where can I find a simple expample of QTableView which implement drag and drop?
    I googled, but not found.

Similar Threads

  1. Replies: 2
    Last Post: 27th June 2011, 18:59
  2. Slow update in QAbstractTableModel in setData
    By cevou in forum Qt Programming
    Replies: 2
    Last Post: 20th May 2010, 14:04
  3. SQL slow query - table update
    By lasher in forum Newbie
    Replies: 4
    Last Post: 21st October 2009, 23:12
  4. QTableWidget won't sort cellwidgets!!!
    By Arsenic in forum Qt Programming
    Replies: 7
    Last Post: 21st July 2007, 10:41
  5. QTableWidget Update - slow
    By DPinLV in forum Qt Programming
    Replies: 16
    Last Post: 18th August 2006, 21:09

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.