#include #include #include "combodelegate.h" int main(int argc, char *argv[]) { QApplication a(argc, argv); QGraphicsScene scene; QTableWidget *table = new QTableWidget(4,2); table->setItemDelegate(new ComboDelegate(table)); QGraphicsProxyWidget *proxy = new QGraphicsProxyWidget(); proxy->setWidget(table); scene.addItem(proxy); QGraphicsView view(&scene); view.show(); return a.exec(); }