hi friends,
is there a way to insert a QComboBox in QTable column ... please help .
hi friends,
is there a way to insert a QComboBox in QTable column ... please help .
"Behind every great fortune lies a crime" - Balzac
(QTable == QTableWidget) ? use QTableWidget::setCellWidget() : specify(Qt3?);
EDIT: in Qt3 there is also Q3Table::cellWidget()...
wagmare (29th May 2009)
Hi,
what is the use of QComboBox inside the QTable column? Is it for editing the content of model? If yes, a good approach is to implement a custom Delegate for editing the column. This delegate will create the QComboBox as editor for each column cell, will fill the QComboBox with the relevant items and manages the set of current value inside the QComboBox, retrieve the user selection and set it as current value inside the table.
Bye.
Alessandro
wagmare (2nd June 2009)
custom Delegate ..
yes this one is the better one ... thank you
"Behind every great fortune lies a crime" - Balzac
Bookmarks