PDA

View Full Version : QTableWidget Questions



Slewman
12th January 2010, 15:29
Hey everyone!

I'm wondering if it is possible to insert a form with some buttons on it into the table itself.

right now, i am trying to call setItem on the table itself and i am casting my form as a QTableWidgetItem* and when i try this... my program crashes.

anyone have any suggestions?

Slewman
12th January 2010, 16:43
If there is another Widget that i can use to insert a form, or insert some buttons, into the table itself that would work fine.

basically, i have a table with x number of fields, and I would like each row to have in the last column a button to turn on or turn off the option.

I have written a work around that basically just shows and raises a form that is NOT IN MY TABLE and i just place it so that it looks like it is. the only problem with that is if i need to scroll down to view more rows, this position is thrown off.

SO... what can fix my problems is:
1. if i can figure out how to insert my "on/off" form into the table as an item

or

2. Figure out a way to determine if I am scrolling the tableWidget and get the new position of the table, or even how much in the y direction the user scrolled.

please, any suggestions would be greatly appreciated!

Slewman
12th January 2010, 17:05
never mind... got things working... setCellWidget was the answer to my question