PDA

View Full Version : Using QPushButton in QTableWidget



arpspatel
15th January 2010, 23:38
Hi guys,

i am working on automatic file sorting and having problems with the interface mainly with the tablewidget

1. I need a tablewidget with four columns :- File name (Line Edit), Move (ComboBox), Browse (PushButton), Ignore (Pushbutton). I have a delegate which handles lineedit, spinbox and combobox. have no idea how to use pushbutton in delegate.

2. when i click on the browse button, file dialog opens and returns a absolute path. this path have to be added and set as current index in the Move combobox

3. Ignore button removes the table widget row..

Thanks for your help

Arpit

axeljaeger
19th January 2010, 21:31
If you just want a button that does not manipulate any model data, use setIndexWidget

ShaChris23
1st September 2010, 00:26
Or you could also use QTableWidget::setCellWidget(QWidget * widget ); and pass QPushButton * to it?