-
table
Hi all,
I need to insert a table in a QT GUI. Which is the widget/view object you suggest? I'm working with QT 4.2.
Requirements are basic. Tab button should move from a cell to the following one in the same row, while enter button should move down to the following row or create a new one.
Thanks for your help.
Gianni
-
Re: table
QTableWidget might be a easier to start with but QTableView is more flexible in the long run and is also more popular amongst QtCentre users. ;)
-
Re: table
You can use either QTableView or QTableWidget
-
Re: table
Thanks jpn an munna,
as far as I know QTableWidget is older than QTableView. The second one uses a new way of programming introduced with QT4, is that right?
I will try with the easiest then. I will ask again if I'm in trouble ;)
Gianni
-
Re: table
QTableWidget is actually a subclass of QTableView. QTableWidget is just a "convenience view", with it's prebuilt default model. So with QTableWidget you don't need a separate model and you can work with QTableWidgetItems instead of QModelIndexes.