Results 1 to 3 of 3

Thread: Table Widget Vs. Table View

  1. #1
    Join Date
    Oct 2008
    Posts
    29
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Table Widget Vs. Table View

    I realise that Table View is "Model Based" and that Table Widget is "Item Based". But what does that actually boil down to? If I was using the table for realtime data (eg. a torrent app of some sort) which would be the better choice? Can I render a progress bar in the cells of both?

  2. #2
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Table Widget Vs. Table View

    You are right that table view is model based and table widget item based.
    But internally tablewidget also uses its own model. Its useful when you dont have much to do with your data.
    When data is large and needs some customization, table view is helpful.
    analyse ur case, if u can use tablewidget, go for it. otherwise table view is there

    And you can render progress bar in both i guess. Tablewidget is derived from table view. and you will need to use delegates in this case.

    One more thing. You cant set a new model in case of tablewidget

  3. #3
    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: Table Widget Vs. Table View

    Tablewidget tends to be less scalable than tableview. If you can fit your data into one of the models already available in Qt, tableview should be a better choice. If you can't then it depends.

Similar Threads

  1. QDockWidget inside another widget in the center?
    By Antebios in forum Qt Programming
    Replies: 1
    Last Post: 16th February 2010, 07:06
  2. Replies: 4
    Last Post: 4th February 2008, 06:16
  3. customizing table widget
    By krishna.bv in forum Qt Programming
    Replies: 1
    Last Post: 25th January 2007, 13:43
  4. Custom widget in list view
    By fusoin23 in forum Qt Programming
    Replies: 1
    Last Post: 18th November 2006, 14:09
  5. Dynamic updates to a table widget
    By guiGuy in forum Qt Programming
    Replies: 6
    Last Post: 1st June 2006, 20:24

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.