View Poll Results: What guiGuy should do?

Voters
18. You may not vote on this poll
  • use QTableWidget

    4 22.22%
  • use QTableView

    14 77.78%
Results 1 to 7 of 7

Thread: Dynamic updates to a table widget

  1. #1
    Join Date
    May 2006
    Posts
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Dynamic updates to a table widget

    Hey Guys,

    I am new to QT and have a general design question. I have to develop a GUI that constantly recieves messages on the back end that will result in table rows being added, deleted, or updated. Is it easy to do this in QT? Should I use a table or table view widget? Thanks,

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Dynamic updates to a table widget

    Yes, it's easy (like everything else in Qt ). IMO QTableView + custom model combo is more flexible than QTableWidget.

  3. #3
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Dynamic updates to a table widget

    Table widget is fine as long as you're not trying to do anything weird and custom..

    If you're happy with what QTableWidget(Item) offers, I'd say go ahead with table widget. Using a table widget is very easy and convenient compared to a table view + model. As you're new to Qt, table widget saves you from learning Qt's model/view programming, which is kind of it's own world..
    J-P Nurmi

  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: Dynamic updates to a table widget

    Let's make a poll whether it's better to use QTableView or QTableWidget

    All those in favour of QTableView say "I"!

    I'd recommend the model-view approach as it'll be easier to perform updates this way. All you'll need to do is to update the model and the view will update itself on its own.

  5. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Dynamic updates to a table widget

    Quote Originally Posted by wysota
    Let's make a poll whether it's better to use QTableView or QTableWidget

    All those in favour of QTableView say "I"!
    "I"!

  6. #6
    Join Date
    Jan 2006
    Location
    South Carolina, USA
    Posts
    34
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Dynamic updates to a table widget

    Quote Originally Posted by wysota
    Let's make a poll whether it's better to use QTableView or QTableWidget

    All those in favour of QTableView say "I"!

    I'd recommend the model-view approach as it'll be easier to perform updates this way. All you'll need to do is to update the model and the view will update itself on its own.
    "I"
    I didn't know this, but you have to enter at least 10 characters to submit a post. Thus me typing that out.

  7. #7
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Dynamic updates to a table widget

    Quote Originally Posted by michael
    I didn't know this, but you have to enter at least 10 characters to submit a post. Thus me typing that out.
    10?

Similar Threads

  1. displaying any table on a qdatatable
    By Philip_Anselmo in forum Newbie
    Replies: 4
    Last Post: 9th May 2006, 22:12
  2. creating table plugin
    By mgurbuz in forum Qt Programming
    Replies: 3
    Last Post: 28th April 2006, 13:50
  3. Replies: 4
    Last Post: 24th March 2006, 22:50
  4. [Qt 4.1.0] Split a widget on demand
    By Townk in forum Qt Programming
    Replies: 3
    Last Post: 17th February 2006, 14:16

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.