qt - Widgets as data in QTableView -
i'm trying make table-based interface follows:
| qcombobox | qpushbutton | empty | | data | data | qpushbutton | | data | data | empty | (all additional rows resemble one)
in first row, want qcombobox
selections defined based on return value of function, , qpushbutton
s attached triggers insert or remove data.
assuming can generate qcombobox
, qpushbutton
s on own, how can them inserted qtableview
in locations? have model stores data need shown in locations marked "some data" , return no data special or "empty" locations, , have qstyleditemdelegate
supposed insert these widgets me, inserts them when double click field (which suppose trigger createeditor
).
figured out.
qabstractitemview
(and extension qtableview
) have method called setindexwidget
can used place widget in location. using method, can insert appropriate widgets on initialization without relying on delegate @ all.
Comments
Post a Comment