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, , qpushbuttons attached triggers insert or remove data.

assuming can generate qcombobox , qpushbuttons 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

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -