PDA

View Full Version : getting user's data from a QTableWidget



fatecasino
14th February 2011, 22:26
hi,
I am trying to do something which seems simple but I don't know how to start.

I have a QTableWidget with 2 columns and 10 rows. The first column has a QComboBox and the second is empty (the user must fill in a number). How can i get the values of the table after the user has finished completing it?

fatecasino
15th February 2011, 16:16
Actually the part I cannot manage is when I have to get the values from the QComboBoxes
It there a way to get the values of each different QCombobox?!

Zlatomir
15th February 2011, 16:25
Yes, i answered here (http://www.qtcentre.org/threads/37015-need-get-data-from-selected-row-from-QTableWidget?p=178132#post178132)

fatecasino
15th February 2011, 17:44
well, I think I am missing something.
I have used successfully the QComboBox in the past.
What I don't understand is how to access/get its values when it is in a QTableWidget.
For example..
when I use the function item(0,0), the system does not know what type of item exists there.Right?

I just would like to learn how to get the values of a QComboBox that is located somewhere in a QTableWidget.
itemText() or itemData() refer to the exclusive usage of QComboBox without being in a QTableWidget.(or I think so)

Added after 52 minutes:

continued here (http://www.qtcentre.org/threads/37015-need-get-data-from-selected-row-from-QTableWidget?p=178146#post178146)