In C++ you would create your own QWidget subclass that either provides access method to get at the sub-widget values, or exposes the sub-widgets as public members that can be directly queried from outside. When you access the cell widget you get a generic QWidget pointer that you need to qobject_cast (in C++):
MyCustomWidget *mywidget = qobject_cast<MyCustomWidget *>(tableWidget->cellWidget(row, col));
if (mywidget) {
// access the member functions/variables through mywidget
}
MyCustomWidget *mywidget = qobject_cast<MyCustomWidget *>(tableWidget->cellWidget(row, col));
if (mywidget) {
// access the member functions/variables through mywidget
}
To copy to clipboard, switch view to plain text mode
Exactly how this is achieved in Python I am not sure.... it might "Just Work" with the object returned by cellWidget() and some Pythonic type magic.
Bookmarks