You cannot obtain it from a QTableWidget.
Use a QTableView instead and create the editor with the default item delegate, using:
QAbstractItemView::itemDelegate and QAbstractItemDelegate::createEditor.
The latter will also return a pointer to the editor.
Regards
Bookmarks