PDA

View Full Version : Dynamic updates to a table widget



guiGuy
1st June 2006, 16:23
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,

jacek
1st June 2006, 16:32
Yes, it's easy (like everything else in Qt ;) ). IMO QTableView + custom model combo is more flexible than QTableWidget.

jpn
1st June 2006, 16:42
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.. ;)

wysota
1st June 2006, 16:46
Let's make a poll whether it's better to use QTableView or QTableWidget :cool:

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.

jacek
1st June 2006, 17:26
Let's make a poll whether it's better to use QTableView or QTableWidget :cool:

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

michael
1st June 2006, 20:11
Let's make a poll whether it's better to use QTableView or QTableWidget :cool:

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" :D
I didn't know this, but you have to enter at least 10 characters to submit a post. Thus me typing that out. ;)

jacek
1st June 2006, 20:24
I didn't know this, but you have to enter at least 10 characters to submit a post. Thus me typing that out. ;)
10? ;)